diff options
author | Neil <nyamatongwe@gmail.com> | 2017-06-13 14:40:47 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2017-06-13 14:40:47 +1000 |
commit | 925359fcfed4cbcd63d5c16449de39afb519bf56 (patch) | |
tree | e00c7c814e724456821a53bff97b37fd6e0f9aff /src | |
parent | 4aaec4d5461e7e7af4a5eccce8c241eb5030c481 (diff) | |
download | scintilla-mirror-925359fcfed4cbcd63d5c16449de39afb519bf56.tar.gz |
Bug [#1949]. Fix drawing failure in wrap mode for delete to start/end of line.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 9020a7051..4b5ecadc2 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -818,8 +818,11 @@ void Editor::MovedCaret(SelectionPosition newPos, SelectionPosition previousPos, const Sci::Line currentLine = pdoc->LineFromPosition(newPos.Position()); if (ensureVisible) { // In case in need of wrapping to ensure DisplayFromDoc works. - if (currentLine >= wrapPending.start) - WrapLines(WrapScope::wsAll); + if (currentLine >= wrapPending.start) { + if (WrapLines(WrapScope::wsAll)) { + Redraw(); + } + } XYScrollPosition newXY = XYScrollToMakeVisible( SelectionRange(posDrag.IsValid() ? posDrag : newPos), xysDefault); if (previousPos.IsValid() && (newXY.xOffset == xOffset)) { @@ -5290,8 +5293,11 @@ Sci::Line Editor::ContractedFoldNext(Sci::Line lineStart) const { void Editor::EnsureLineVisible(Sci::Line lineDoc, bool enforcePolicy) { // In case in need of wrapping to ensure DisplayFromDoc works. - if (lineDoc >= wrapPending.start) - WrapLines(WrapScope::wsAll); + if (lineDoc >= wrapPending.start) { + if (WrapLines(WrapScope::wsAll)) { + Redraw(); + } + } if (!cs.GetVisible(lineDoc)) { // Back up to find a non-blank line |