Mercurial > octave
changeset 28297:1127bcb30e61 stable
Restore editor x-offset after highlight-all-occurrences double-click (bug #58372)
* file-editor-tab.cc (file_editor_tab::handle_double_click): Use base class
routine QsciScintillaBase::SendScintilla() to access SCI_GETXOFFSET and
SCI_SETXOFFSET.
author | Daniel J Sebald <daniel.sebald@ieee.org> |
---|---|
date | Sat, 16 May 2020 03:46:38 -0400 |
parents | 6beb610b3bcd |
children | b8a38ed00bf4 8085ae13cc4a |
files | libgui/src/m-editor/file-editor-tab.cc |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.cc Fri May 15 08:21:23 2020 -0700 +++ b/libgui/src/m-editor/file-editor-tab.cc Sat May 16 03:46:38 2020 -0400 @@ -3140,8 +3140,9 @@ { // word is not empty, so find all occurrences of the word - // remember first visible line for restoring the view afterwards + // remember first visible line and x-offset for restoring the view afterwards int first_line = m_edit_area->firstVisibleLine (); + int x_offset = m_edit_area->SendScintilla(QsciScintillaBase::SCI_GETXOFFSET); // search for first occurrence of the detected word bool find_result_available @@ -3176,6 +3177,7 @@ // restore the visible area of the file, the cursor position, // and the selection m_edit_area->setFirstVisibleLine (first_line); + m_edit_area->SendScintilla(QsciScintillaBase::SCI_SETXOFFSET, x_offset); m_edit_area->setCursorPosition (line, col); m_edit_area->setSelection (line, col - wlen, line, col); m_edit_area->set_word_selection (word);