Skip to content

Commit

Permalink
Fixed bug where DeleteLines would not adjust scroll bar positions pro…
Browse files Browse the repository at this point in the history
…perly
  • Loading branch information
nickgammon committed Feb 23, 2013
1 parent 3d9f19d commit 58e0045
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions scripting/methods/methods_output.cpp
Expand Up @@ -287,7 +287,14 @@ POSITION pos;
}


// notify view to invalidate this part
int lastline;

lastline = GetLastLine ();


// notify view that we have "added" stuff (deleted, really)
// this is so that scroll bar positions are recalculated, and the
// view now scrolls to the bottom, making the previous lines now end at the end of the window.

for(pos = GetFirstViewPosition(); pos != NULL; )
{
Expand All @@ -297,10 +304,12 @@ POSITION pos;
{
CMUSHView* pmyView = (CMUSHView*)pView;

pmyView->Invalidate ();
pmyView->addedstuff ();

} // end of being an output view
} // end of doing each view


} // end of DeleteLines


Expand Down

0 comments on commit 58e0045

Please sign in to comment.