# HG changeset patch # User Torsten # Date 1515952281 -3600 # Node ID 7a0cf02ed6d5be81e247f5f0eb8b5d110b1e10eb # Parent 6c3b7ca0cb90d711a8122d0dfb0ef70e2e18106f fix highlighting/replacing all occurrences after double-click (bug #52859) * octave-qscintilla.cc (set_word_selection, show_replace_action_tooltip, keyPressEvent): use get_current_position instead of getCursorPosition taking tabs into account; diff -r 6c3b7ca0cb90 -r 7a0cf02ed6d5 libgui/src/m-editor/octave-qscintilla.cc --- a/libgui/src/m-editor/octave-qscintilla.cc Sat Jan 13 10:27:11 2018 -0800 +++ b/libgui/src/m-editor/octave-qscintilla.cc Sun Jan 14 18:51:21 2018 +0100 @@ -666,7 +666,10 @@ QToolTip::hideText (); } else - getCursorPosition (&m_selection_line, &m_selection_col); + { + int pos; + get_current_position (&pos, &m_selection_line, &m_selection_col); + } } void @@ -767,7 +770,8 @@ void octave_qscintilla::show_replace_action_tooltip (void) { - getCursorPosition (&m_selection_line, &m_selection_col); + int pos; + get_current_position (&pos, &m_selection_line, &m_selection_col); // Offer to replace other instances. @@ -807,8 +811,8 @@ { // get the resulting cursor position // (required if click was beyond a line ending) - int line, col; - getCursorPosition (&line, &col); + int pos, line, col; + get_current_position (&pos, &line, &col); // remember first visible line for restoring the view afterwards int first_line = firstVisibleLine (); @@ -837,7 +841,7 @@ // different from the original. int new_line, new_col; - getCursorPosition (&new_line, &new_col); + get_current_position (&pos, &new_line, &new_col); find_result_available = findFirst (m_selection,