Fixed string subscript out of range bug in editors undo stack.
This commit is contained in:
@@ -10,6 +10,8 @@ _____________________________________________________________________________
|
||||
<20><><EFBFBD><EFBFBD>⪨ <20><><EFBFBD> GoldED+ 1.1.5, /snapshot/
|
||||
_____________________________________________________________________________
|
||||
|
||||
- <20><><EFBFBD>ࠢ<EFBFBD><E0A0A2><EFBFBD> <20><><EFBFBD> <20> <20>⥪<EFBFBD> <20>⪠<EFBFBD><E2AAA0> ।<><E0A5A4><EFBFBD><EFBFBD><EFBFBD><EFBFBD>, <20><><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><E0AEA1><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>
|
||||
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> 祬 ࠧ<><E0A0A7><EFBFBD> <20><>ப<EFBFBD>.
|
||||
+ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ReadForceDeleteMsg (<28><> 㬮<>砭<EFBFBD><E7A0AD> #Del) <20> goldkeys.cfg <20><><EFBFBD> 㤠<><E3A4A0><EFBFBD><EFBFBD><EFBFBD>
|
||||
ᮮ<>饭<EFBFBD><E9A5AD> <20><><EFBFBD><EFBFBD><EFBFBD> AreaRecicleBin.
|
||||
! <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ࠬ<EFBFBD><E0A0AC><EFBFBD><EFBFBD> AreaRecycleBin <20><> AreaRecycleBin <area> [NoAsk/Ask].
|
||||
|
@@ -10,6 +10,8 @@ ______________________________________________________________________
|
||||
Notes for GoldED+ 1.1.5, /snapshot/
|
||||
______________________________________________________________________
|
||||
|
||||
- Fixed string subscript out of range in editors undo stack.
|
||||
|
||||
+ Added ReadForceDeleteMsg (default is #Del) to the goldkeys.cfg used to
|
||||
delete messages without moving them to AreaRecicleBin.
|
||||
|
||||
|
@@ -1063,26 +1063,27 @@ Line* IEclass::wrapit(Line** __currline, uint* __curr_col, uint* __curr_row, boo
|
||||
}
|
||||
}
|
||||
|
||||
// Was this line truncated at space?
|
||||
bool truncated_at_space = make_bool(isspace(_thisline->txt[_wrappos]));
|
||||
|
||||
// Truncate at the wrapping location
|
||||
_thisline->txt.erase(_wrappos);
|
||||
|
||||
// Was this line quoted?
|
||||
if(_quotelen) {
|
||||
|
||||
if (_quotelen)
|
||||
{
|
||||
// Trim spaces off the end of the line
|
||||
int _trimpos = _wrappos - 1;
|
||||
if(isspace(_thisline->txt[_trimpos])) {
|
||||
while(_trimpos > 0 and isspace(_thisline->txt[_trimpos-1]))
|
||||
if (isspace(_thisline->txt[_trimpos]))
|
||||
{
|
||||
while (_trimpos > 0 and isspace(_thisline->txt[_trimpos-1]))
|
||||
_trimpos--;
|
||||
if(_quotelen and (_trimpos < _quotelen))
|
||||
_trimpos++;
|
||||
Undo->PushItem(EDIT_UNDO_OVR_CHAR|BATCH_MODE, _thisline, _trimpos);
|
||||
_thisline->txt.erase(_trimpos);
|
||||
}
|
||||
Undo->PushItem((truncated_at_space?EDIT_UNDO_OVR_CHAR:EDIT_UNDO_INS_CHAR)|BATCH_MODE, _thisline, _trimpos+1);
|
||||
else
|
||||
{
|
||||
Undo->PushItem(EDIT_UNDO_INS_CHAR|BATCH_MODE, _thisline, _trimpos + 1);
|
||||
}
|
||||
|
||||
// Append a new linefeed
|
||||
_thisline->txt += "\n";
|
||||
|
Reference in New Issue
Block a user