diff libgui/src/m-editor/octave-qscintilla.h @ 27198:dffdabfd0213

fix cursor position for editor smart indent after keyword (bug #56533) * file-editor-tab.cc (notice_settings): initialize new class variable holding the width of the character used for indentation; (handle_cursor_moved): pass new class variable to smart_indent * file-editor-tab.h: new class variable for indentation character width * octave-qscintilla.cc (smart_indent): length of indentation character is a new parameter which is used for setting the cursor position at the end of the indentation of a new line * octave-qscintilla.cc (smart_indent): new parameter
author Torsten Lilge <ttl-octave@mailbox.org>
date Tue, 25 Jun 2019 22:10:14 +0200
parents fbe46901ae62
children da1f59fe04b3
line wrap: on
line diff
--- a/libgui/src/m-editor/octave-qscintilla.h	Sat Jun 22 17:30:16 2019 -0500
+++ b/libgui/src/m-editor/octave-qscintilla.h	Tue Jun 25 22:10:14 2019 +0200
@@ -63,7 +63,8 @@
     QStringList comment_string (bool comment = true);
     int get_style (int pos = -1);
     int is_style_comment (int pos = -1);
-    void smart_indent (bool do_smart_indent, int do_auto_close, int line);
+    void smart_indent (bool do_smart_indent, int do_auto_close,
+                       int line, int ind_char_width);
 
     void smart_indent_line_or_selected_text (int lineFrom, int lineTo);