Mercurial > hg > octave-nkf
comparison 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 |
comparison
equal
deleted
inserted
replaced
16715:96ed7ab44e2e | 16716:23b5dde25367 |
---|---|
139 void handle_save_file_as_answer_cancel (); | 139 void handle_save_file_as_answer_cancel (); |
140 | 140 |
141 // When apis preparation has finished and is ready to save | 141 // When apis preparation has finished and is ready to save |
142 void save_apis_info (); | 142 void save_apis_info (); |
143 | 143 |
144 // When the numer of lines changes -> adapt width of margin | |
145 void auto_margin_width (); | |
146 | |
144 private: | 147 private: |
145 | 148 |
146 enum editor_markers | 149 enum editor_markers |
147 { | 150 { |
148 bookmark, | 151 bookmark, |