Mercurial > hg > octave-nkf
diff libgui/src/m-editor/file-editor-tab.h @ 16716:23b5dde25367
make octave lexer the default and dynamically set margin width for line numbers
* file-editor-tab.cc(update_lexer): octave lexer is the default lexer,
remove check for a lexer before setting its apis, reset the width of the
margin displaying the line numbers because char size may have changed,
(notice_settings): call update_lexer only if there is a file name to prevent
the function being called just after tab creation before the file is loaded,
do not explicitly use the font metrics for the margin width since they are
already respected by setMarginWidth, (dis)connect new slot auto_margin_width
to signal linesChanged in order to atuomatically set width for line numbers,
(auto_margin_width): set width of margin ahich displays the line numbers
depending on max. line number
* file-editor-tab.h: new slot auto_margin_width
author | Torsten <ttl@justmail.de> |
---|---|
date | Sat, 01 Jun 2013 19:40:24 +0200 |
parents | 96ed7ab44e2e |
children | 0f6f14e3ac6a |
line wrap: on
line diff
--- a/libgui/src/m-editor/file-editor-tab.h +++ b/libgui/src/m-editor/file-editor-tab.h @@ -141,6 +141,9 @@ // When apis preparation has finished and is ready to save void save_apis_info (); + // When the numer of lines changes -> adapt width of margin + void auto_margin_width (); + private: enum editor_markers