# HG changeset patch # User Rik # Date 1589661408 25200 # Node ID b8a38ed00bf47ab230329111ecf768429c08b062 # Parent 0c6dcf8035294bee94f1eddc34845154993d154a# Parent 1127bcb30e610b9aa040326cb24d4b63a2312f19 maint: merge stable to default. diff -r 0c6dcf803529 -r b8a38ed00bf4 libgui/src/m-editor/file-editor-tab.cc --- a/libgui/src/m-editor/file-editor-tab.cc Sat May 16 13:32:24 2020 -0700 +++ b/libgui/src/m-editor/file-editor-tab.cc Sat May 16 13:36:48 2020 -0700 @@ -3188,8 +3188,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 @@ -3224,6 +3225,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); diff -r 0c6dcf803529 -r b8a38ed00bf4 test/bug-50831/bug-50831.tst --- a/test/bug-50831/bug-50831.tst Sat May 16 13:32:24 2020 -0700 +++ b/test/bug-50831/bug-50831.tst Sat May 16 13:36:48 2020 -0700 @@ -1,5 +1,5 @@ %!test -%! filename = "save-text.var"; +%! filename = tempname (); %! s.("a-b") = "bad fieldname"; %! unwind_protect %! save ("-text", filename, "s");