@@ -952,6 +952,7 @@ void System::editSource(strlib::String loadPath, bool restoreOnExit) {
952952 cleanFile.append (" - " );
953953 cleanFile.append (fileName);
954954
955+ bool showStatus = true ;
955956 int w = _output->getWidth ();
956957 int h = _output->getHeight ();
957958 int charWidth = _output->getCharWidth ();
@@ -985,6 +986,7 @@ void System::editSource(strlib::String loadPath, bool restoreOnExit) {
985986 editWidget->setCursorRow (gsb_last_line + editWidget->getSelectionRow () - 1 );
986987 runtime->alert (gsb_last_errmsg);
987988 }
989+
988990 _srcRendered = false ;
989991 _output->setStatus (cleanFile);
990992 _output->redraw ();
@@ -994,8 +996,20 @@ void System::editSource(strlib::String loadPath, bool restoreOnExit) {
994996 while (_state == kEditState ) {
995997 MAEvent event = getNextEvent ();
996998 switch (event.type ) {
999+ case EVENT_TYPE_POINTER_PRESSED:
1000+ if (!showStatus && event.point .x < editWidget->getMarginWidth ()) {
1001+ _output->setStatus (editWidget->isDirty () ? dirtyFile : cleanFile);
1002+ showStatus = true ;
1003+ }
1004+ break ;
1005+ case EVENT_TYPE_POINTER_RELEASED:
1006+ if (showStatus && event.point .x < editWidget->getMarginWidth () && editWidget->getScroll ()) {
1007+ _output->setStatus (" " );
1008+ showStatus = false ;
1009+ }
1010+ break ;
9971011 case EVENT_TYPE_OPTIONS_BOX_BUTTON_CLICKED:
998- if (editWidget->isDirty ()) {
1012+ if (editWidget->isDirty () && !editWidget-> getScroll () ) {
9991013 _output->setStatus (dirtyFile);
10001014 _output->redraw ();
10011015 }
@@ -1068,10 +1082,8 @@ void System::editSource(strlib::String loadPath, bool restoreOnExit) {
10681082 redraw = widget->edit (event.key , sw, charWidth);
10691083 break ;
10701084 }
1071- if (widget->isDirty () && !dirty) {
1072- _output->setStatus (dirtyFile);
1073- } else if (!widget->isDirty () && dirty) {
1074- _output->setStatus (cleanFile);
1085+ if (editWidget->isDirty () != dirty && !editWidget->getScroll ()) {
1086+ _output->setStatus (editWidget->isDirty () ? dirtyFile : cleanFile);
10751087 }
10761088 if (redraw) {
10771089 _output->redraw ();
0 commit comments