Skip to content

Commit

Permalink
Merge 97216e8 into adace69
Browse files Browse the repository at this point in the history
  • Loading branch information
agarny committed Jun 5, 2018
2 parents adace69 + 97216e8 commit ee8d72b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/downloads/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ var jsonData = { "versions": [
}
],
"changes": [
{ "change": "<strong>Property Editor widget:</strong> prevent infinite \"Replace all\" actions (see issue <a href=\"https://github.com/opencor/opencor/issues/1677\">#1677</a>)." },
{ "change": "<strong>Text-based editors:</strong> prevent infinite \"Replace all\" actions (see issue <a href=\"https://github.com/opencor/opencor/issues/1677\">#1677</a>). Now have word-wrap alignment <a href=\"https://github.com/opencor/opencor/issues/1680\">#1680</a>)." },
{ "change": "<strong>Third-party libraries:</strong> upgraded <a href=\"https://libgit2.github.com/\">libgit2</a> to version 0.27.1 (see issue <a href=\"https://github.com/opencor/opencor/issues/1672\">#1672</a>)." }
]
},
Expand Down
9 changes: 8 additions & 1 deletion src/plugins/widget/EditorWidget/src/editorwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ EditorWidget::EditorWidget(const QString &pContents, bool pReadOnly,

mEditor->setFocusPolicy(Qt::NoFocus);

// Customise our word wrap feature

mEditor->setWrapIndentMode(QsciScintilla::WrapIndentSame);
mEditor->setWrapVisualFlags(QsciScintilla::WrapFlagInMargin);

// Forward some signals that are emitted by our editor
// Note: we cannot use the new connect() syntax since the signal is located
// in our QScintilla plugin and that we don't know anything about
Expand Down Expand Up @@ -456,7 +461,9 @@ void EditorWidget::setWordWrap(bool pWordWrap)
{
// Word wrap (or not) the text

mEditor->setWrapMode(pWordWrap?QsciScintilla::WrapWord:QsciScintilla::WrapNone);
mEditor->setWrapMode(pWordWrap?
QsciScintilla::WrapWord:
QsciScintilla::WrapNone);
}

//==============================================================================
Expand Down

0 comments on commit ee8d72b

Please sign in to comment.