Fixed undo bug after block deletion
This commit is contained in:
parent
218ab23b01
commit
e1b24c65d2
@ -12,6 +12,15 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
- Fixed more bugs with block deletion undo.
|
||||
|
||||
+ OS/2 only: if environment variable PMWIN set to NO then GoldED+ will
|
||||
not try to use PMWIN functions.
|
||||
|
||||
- Fixed cosmetic bug in thread tree: line was painted incompletely.
|
||||
|
||||
- Fixed environment variables expansion recently broken.
|
||||
|
||||
- When reading pathnames from Maximus 3 areafile GoldED+ had not
|
||||
prepend Maximus path. Fixed.
|
||||
|
||||
|
@ -77,12 +77,12 @@ void IEclass::debugtest(char* __test, int __a, int __b, char* __file, int __line
|
||||
LOG.printf("! An internal editor range check failed.");
|
||||
if(__values)
|
||||
LOG.printf(": Details: (%s) <%i,%i>.", __test, __a, __b);
|
||||
else
|
||||
else {
|
||||
LOG.printf(": Details: (%s).", __test);
|
||||
LOG.printf(": Details: r%u,c%u,mr%u,mc%u,i%u,dm%u,qm%u,eqm%u.",
|
||||
row, col, maxrow, maxcol, insert,
|
||||
CFG->dispmargin, CFG->quotemargin, EDIT->QuoteMargin()
|
||||
);
|
||||
row, col, maxrow, maxcol, insert,
|
||||
CFG->dispmargin, CFG->quotemargin, EDIT->QuoteMargin());
|
||||
}
|
||||
LOG.printf("+ Advice: Report to the Author.");
|
||||
TestErrorExit();
|
||||
}
|
||||
@ -2767,19 +2767,19 @@ void UndoStack::PlayItem() {
|
||||
|
||||
// we need to fit thisrow into the screen boundaries
|
||||
if(delta > 0) {
|
||||
for (row -= delta; (int)row < (int)minrow; row++) {
|
||||
if(templine) // cause refresh() issue an error since templine should never be NULL
|
||||
templine = templine->next;
|
||||
}
|
||||
temprow = minrow;
|
||||
}
|
||||
else {
|
||||
for (row -= delta; row > maxrow; row--) {
|
||||
for(row += delta; row > maxrow; row--) {
|
||||
if(templine) // cause refresh() issue an error since templine should never be NULL
|
||||
templine = templine->prev;
|
||||
}
|
||||
temprow = maxrow;
|
||||
}
|
||||
else {
|
||||
for(row += delta; (int)row < (int)minrow; row++) {
|
||||
if(templine) // cause refresh() issue an error since templine should never be NULL
|
||||
templine = templine->next;
|
||||
}
|
||||
temprow = minrow;
|
||||
}
|
||||
|
||||
// move pointer to the top of screen so we refresh scrolled area
|
||||
while (row != minrow) {
|
||||
|
@ -634,7 +634,15 @@ void IEclass::BlockDel(Line* anchor) {
|
||||
if(firstcutline != lastcutline) {
|
||||
size_t __len = firstcutline->txt.length();
|
||||
firstcutline->txt += lastcutline->txt.c_str()+lastcol;
|
||||
|
||||
// We need to set up prow to prevent cosmetic bugs
|
||||
uint __prow = prow;
|
||||
getthisrow(firstcutline);
|
||||
prow = thisrow;
|
||||
getthisrow(currline);
|
||||
Undo->PushItem(EDIT_UNDO_INS_TEXT, firstcutline, __len);
|
||||
prow = __prow;
|
||||
|
||||
Undo->PushItem(EDIT_UNDO_DEL_TEXT|BATCH_MODE, firstcutline, firstcol, __len-firstcol);
|
||||
firstcutline->txt.erase(firstcol, __len-firstcol);
|
||||
}
|
||||
|
Reference in New Issue
Block a user