# HG changeset patch # User Daniel J Sebald # Date 1589615198 14400 # Node ID 1127bcb30e610b9aa040326cb24d4b63a2312f19 # Parent 6beb610b3bcd71f77ae99177ff8e2c8e3175556b 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. diff -r 6beb610b3bcd -r 1127bcb30e61 libgui/src/m-editor/file-editor-tab.cc --- 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);