File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -677,7 +677,18 @@ function updateStatusBar() {
677677 statusCursor . text ( cursorText ) ;
678678 var fileText = ' — ' + editor . lineCount ( ) + ' Lines' ;
679679 statusFile . text ( fileText ) ;
680- statusLength . text ( 'Length ' + editor . getValue ( ) . length ) ;
680+ var docLength = editor . getValue ( ) . length ;
681+ statusLength . text ( 'Length ' + docLength ) ;
682+ if ( docLength > ( docmaxlength * 0.95 ) ) {
683+ statusLength . css ( 'color' , 'red' ) ;
684+ statusLength . attr ( 'title' , 'Your almost reach note max length limit.' ) ;
685+ } else if ( docLength > ( docmaxlength * 0.8 ) ) {
686+ statusLength . css ( 'color' , 'orange' ) ;
687+ statusLength . attr ( 'title' , 'You nearly fill the note, consider to make more pieces.' ) ;
688+ } else {
689+ statusLength . css ( 'color' , 'white' ) ;
690+ statusLength . attr ( 'title' , 'You could write up to ' + docmaxlength + ' characters in this note.' ) ;
691+ }
681692}
682693
683694//ui vars
You can’t perform that action at this time.
0 commit comments