--- include/Scintilla.h Tue Jan 20 09:26:36 1970 +++ include/Scintilla.h Tue Jan 20 09:26:36 1970 @@ -118,10 +118,7 @@ #define SC_MARK_ARROWS 24 #define SC_MARK_PIXMAP 25 #define SC_MARK_FULLRECT 26 -#define SC_MARK_LEFTRECT 27 #define SC_MARK_CHARACTER 10000 -#define SC_MARKNUM_CHANGEUNSAVED 23 -#define SC_MARKNUM_CHANGESAVED 24 #define SC_MARKNUM_FOLDEREND 25 #define SC_MARKNUM_FOLDEROPENMID 26 #define SC_MARKNUM_FOLDERMIDTAIL 27 @@ -129,7 +126,7 @@ #define SC_MARKNUM_FOLDERSUB 29 #define SC_MARKNUM_FOLDER 30 #define SC_MARKNUM_FOLDEROPEN 31 -#define SC_MASK_FOLDERS 0xFF800000 +#define SC_MASK_FOLDERS 0xFE000000 #define SCI_MARKERDEFINE 2040 #define SCI_MARKERSETFORE 2041 #define SCI_MARKERSETBACK 2042 @@ -146,7 +143,6 @@ #define SC_MARGIN_NUMBER 1 #define SC_MARGIN_BACK 2 #define SC_MARGIN_FORE 3 -#define SC_MARGIN_CHANGED 4 #define SCI_SETMARGINTYPEN 2240 #define SCI_GETMARGINTYPEN 2241 #define SCI_SETMARGINWIDTHN 2242 --- include/Scintilla.iface Tue Jan 20 09:26:36 1970 +++ include/Scintilla.iface Tue Jan 20 09:26:36 1970 @@ -268,14 +268,11 @@ val SC_MARK_ARROWS=24 val SC_MARK_PIXMAP=25 val SC_MARK_FULLRECT=26 -val SC_MARK_LEFTRECT=27 val SC_MARK_CHARACTER=10000 enu MarkerOutline=SC_MARKNUM_ -# Markers used for outlining and changed column. -val SC_MARKNUM_CHANGEUNSAVED=23 -val SC_MARKNUM_CHANGESAVED=24 +# Markers used for outlining column. val SC_MARKNUM_FOLDEREND=25 val SC_MARKNUM_FOLDEROPENMID=26 val SC_MARKNUM_FOLDERMIDTAIL=27 @@ -284,7 +281,7 @@ val SC_MARKNUM_FOLDER=30 val SC_MARKNUM_FOLDEROPEN=31 -val SC_MASK_FOLDERS=0xFF800000 +val SC_MASK_FOLDERS=0xFE000000 # Set the symbol used for a particular marker number. fun void MarkerDefine=2040(int markerNumber, int markerSymbol) @@ -327,7 +324,6 @@ val SC_MARGIN_NUMBER=1 val SC_MARGIN_BACK=2 val SC_MARGIN_FORE=3 -val SC_MARGIN_CHANGED=4 # Set a margin to be either numeric or symbolic. set void SetMarginTypeN=2240(int margin, int marginType) --- src/CellBuffer.cxx Tue Jan 20 09:26:36 1970 +++ src/CellBuffer.cxx Tue Jan 20 09:26:36 1970 @@ -15,7 +15,6 @@ #include "Scintilla.h" #include "SplitVector.h" #include "Partitioning.h" -#include "RunStyles.h" #include "CellBuffer.h" #ifdef SCI_NAMESPACE @@ -127,87 +126,6 @@ other->root = 0; } -LineChanges::LineChanges() : collecting(0), edition(0) { -} - -LineChanges::~LineChanges() { -} - -void LineChanges::AdvanceEdition() { - edition = (edition + 1) % 0x40000000; -} - -int LineChanges::GetEdition() const { - return edition; -} - -char *LineChanges::PersistantForm() const { - if (collecting) - return state.PersistantForm(); - else - return 0; -} - -void LineChanges::SetChanges(const char *changesState) { - if (collecting && changesState) { - state.FromPersistant(changesState); - AdvanceEdition(); - } -} - -void LineChanges::InsertText(int line, int edition, bool undoing) { - if (collecting && !undoing) { - int position = line; - int fillLength = 1; - if (state.FillRange(position, edition, fillLength)) { - if (fillLength > 0) { - AdvanceEdition(); - } - } - } -} - -void LineChanges::InsertLine(int line, bool undoing) { - if (collecting && !undoing) { - state.InsertSpace(line, 1); - int linePosition = line; - int fillLength = 1; - if (state.FillRange(linePosition, 1, fillLength)) - AdvanceEdition(); - } -} - -void LineChanges::RemoveLine(int line, bool undoing) { - if (collecting && !undoing) { - state.DeleteRange(line, 1); - AdvanceEdition(); - } -} - -void LineChanges::EnableChangeCollection(bool collecting_, int lines) { - collecting = collecting_; - if (collecting) { - state.InsertSpace(0, lines); - } -} - -void LineChanges::ClearChanged() { - if (collecting) { - int position = 0; - int length = state.Length(); - if (state.FillRange(position, 0, length)) - AdvanceEdition(); - } -} - -int LineChanges::GetChanged(int line) const { - if (collecting) { - return state.ValueAt(line); - } - return 0; -} - - LineVector::LineVector() : starts(256) { handleCurrent = 1; @@ -264,17 +182,15 @@ } } -void LineVector::InsertText(int line, int delta, int edition, bool undoing) { +void LineVector::InsertText(int line, int delta) { starts.InsertText(line, delta); - changes.InsertText(line, edition, undoing); } -void LineVector::InsertLine(int line, int position, bool undoing) { +void LineVector::InsertLine(int line, int position) { starts.InsertPartition(line, position); if (markers.Length()) { markers.Insert(line, 0); } - changes.InsertLine(line, undoing); if (levels.Length()) { int level = SC_FOLDLEVELBASE; if ((line > 0) && (line < Lines())) { @@ -288,7 +204,7 @@ starts.SetPartitionStartPosition(line, position); } -void LineVector::RemoveLine(int line, bool undoing) { +void LineVector::RemoveLine(int line) { starts.RemovePartition(line); // Retain the markers from the deleted line by oring them into the previous line if (markers.Length()) { @@ -297,7 +213,6 @@ } markers.Delete(line); } - changes.RemoveLine(line, undoing); if (levels.Length()) { // Move up following lines but merge header flag from this line // to line before to avoid a temporary disappearence causing expansion. @@ -388,31 +303,6 @@ return -1; } -void LineVector::EnableChangeCollection(bool changesCollecting_) { - changes.ClearChanged(); - changes.EnableChangeCollection(changesCollecting_, Lines()); -} - -int LineVector::GetChanged(int line) const { - return changes.GetChanged(line); -} - -int LineVector::GetChangesEdition() const { - return changes.GetEdition(); -} - -void LineVector::SetSavePoint() { - changes.AdvanceEdition(); -} - -char *LineVector::PersistantForm() const { - return changes.PersistantForm(); -} - -void LineVector::SetChanges(const char *changesState) { - changes.SetChanges(changesState); -} - Action::Action() { at = startAction; position = 0; @@ -481,15 +371,11 @@ currentAction = 0; undoSequenceDepth = 0; savePoint = 0; - savePointEffective = 0; - - changeActions = 0; actions[currentAction].Create(startAction); } UndoHistory::~UndoHistory() { - DeleteChangeHistory(); delete []actions; actions = 0; } @@ -500,18 +386,6 @@ if (currentAction >= (lenActions - 2)) { // Run out of undo nodes so extend the array int lenActionsNew = lenActions * 2; - - if (changeActions) { - int **changeActionsNew = new int *[lenActionsNew]; - if (!changeActionsNew) - return; - for (int i=0;i 0) && (maxAction > 0); } @@ -692,10 +530,6 @@ currentAction--; } -char *UndoHistory::GetChangesStep() const { - return changeActions ? (char *)changeActions[currentAction] : 0; -} - bool UndoHistory::CanRedo() const { return maxAction > currentAction; } @@ -721,10 +555,6 @@ currentAction++; } -int UndoHistory::Edition() const { - return currentAction; -} - CellBuffer::CellBuffer() { readOnly = false; collectingUndo = true; @@ -769,11 +599,10 @@ for (int i = 0; i < insertLength; i++) { data[i] = s[i]; } - char *persistantForm = lv.PersistantForm(); - uh.AppendAction(insertAction, position, data, insertLength, startSequence, persistantForm); + uh.AppendAction(insertAction, position, data, insertLength, startSequence); } - BasicInsertString(position, s, insertLength, false); + BasicInsertString(position, s, insertLength); } return data; } @@ -816,11 +645,10 @@ for (int i = 0; i < deleteLength; i++) { data[i] = substance.ValueAt(position + i); } - char *persistantForm = lv.PersistantForm(); - uh.AppendAction(removeAction, position, data, deleteLength, startSequence, persistantForm); + uh.AppendAction(removeAction, position, data, deleteLength, startSequence); } - BasicDeleteChars(position, deleteLength, false); + BasicDeleteChars(position, deleteLength); } return data; } @@ -857,7 +685,6 @@ void CellBuffer::SetSavePoint() { uh.SetSavePoint(); - lv.SetSavePoint(); } bool CellBuffer::IsSavePoint() { @@ -897,37 +724,23 @@ return lv.LineFromHandle(markerHandle); } -int CellBuffer::GetChanged(int line) const { - int changed = lv.GetChanged(line); - if (changed == 0) - return 0; - else if (uh.BeforeSavePointEffective(changed)) - return 2; - else - return 1; -} - -int CellBuffer::GetChangesEdition() const { - return lv.GetChangesEdition(); -} - // Without undo -void CellBuffer::InsertLine(int line, int position, bool undoing) { - lv.InsertLine(line, position, undoing); +void CellBuffer::InsertLine(int line, int position) { + lv.InsertLine(line, position); if (lineStates.Length()) { lineStates.Insert(line, 0); } } -void CellBuffer::RemoveLine(int line, bool undoing) { - lv.RemoveLine(line, undoing); +void CellBuffer::RemoveLine(int line) { + lv.RemoveLine(line); if (lineStates.Length() > line) { lineStates.Delete(line); } } -void CellBuffer::BasicInsertString(int position, const char *s, int insertLength, bool undoing) { +void CellBuffer::BasicInsertString(int position, const char *s, int insertLength) { if (insertLength == 0) return; PLATFORM_ASSERT(insertLength > 0); @@ -937,26 +750,26 @@ int lineInsert = lv.LineFromPosition(position) + 1; // Point all the lines after the insertion point further along in the buffer - lv.InsertText(lineInsert-1, insertLength, uh.Edition(), undoing); + lv.InsertText(lineInsert-1, insertLength); char chPrev = substance.ValueAt(position - 1); char chAfter = substance.ValueAt(position + insertLength); if (chPrev == '\r' && chAfter == '\n') { // Splitting up a crlf pair at position - InsertLine(lineInsert, position, undoing); + InsertLine(lineInsert, position); lineInsert++; } char ch = ' '; for (int i = 0; i < insertLength; i++) { ch = s[i]; if (ch == '\r') { - InsertLine(lineInsert, (position + i) + 1, undoing); + InsertLine(lineInsert, (position + i) + 1); lineInsert++; } else if (ch == '\n') { if (chPrev == '\r') { // Patch up what was end of line lv.SetLineStart(lineInsert - 1, (position + i) + 1); } else { - InsertLine(lineInsert, (position + i) + 1, undoing); + InsertLine(lineInsert, (position + i) + 1); lineInsert++; } } @@ -966,12 +779,12 @@ if (chAfter == '\n') { if (ch == '\r') { // End of line already in buffer so drop the newly created one - RemoveLine(lineInsert - 1, undoing); + RemoveLine(lineInsert - 1); } } } -void CellBuffer::BasicDeleteChars(int position, int deleteLength, bool undoing) { +void CellBuffer::BasicDeleteChars(int position, int deleteLength) { if (deleteLength == 0) return; @@ -984,7 +797,7 @@ // to work out which lines have been removed int lineRemove = lv.LineFromPosition(position) + 1; - lv.InsertText(lineRemove-1, - (deleteLength), uh.Edition(), undoing); + lv.InsertText(lineRemove-1, - (deleteLength)); char chPrev = substance.ValueAt(position - 1); char chBefore = chPrev; char chNext = substance.ValueAt(position); @@ -1001,13 +814,13 @@ chNext = substance.ValueAt(position + i + 1); if (ch == '\r') { if (chNext != '\n') { - RemoveLine(lineRemove, undoing); + RemoveLine(lineRemove); } } else if (ch == '\n') { if (ignoreNL) { ignoreNL = false; // Further \n are real deletions } else { - RemoveLine(lineRemove, undoing); + RemoveLine(lineRemove); } } @@ -1018,7 +831,7 @@ char chAfter = substance.ValueAt(position + deleteLength); if (chBefore == '\r' && chAfter == '\n') { // Using lineRemove-1 as cr ended line before start of deletion - RemoveLine(lineRemove - 1, undoing); + RemoveLine(lineRemove - 1); lv.SetLineStart(lineRemove - 1, position + 1); } } @@ -1044,10 +857,8 @@ uh.EndUndoAction(); } -void CellBuffer::DeleteUndoHistory(bool collectChangeHistory) { +void CellBuffer::DeleteUndoHistory() { uh.DeleteUndoHistory(); - uh.EnableChangeHistory(collectChangeHistory); - lv.EnableChangeCollection(collectChangeHistory); } bool CellBuffer::CanUndo() { @@ -1063,13 +874,11 @@ } void CellBuffer::PerformUndoStep() { - const char *changesState = uh.GetChangesStep(); - lv.SetChanges(changesState); const Action &actionStep = uh.GetUndoStep(); if (actionStep.at == insertAction) { - BasicDeleteChars(actionStep.position, actionStep.lenData, true); + BasicDeleteChars(actionStep.position, actionStep.lenData); } else if (actionStep.at == removeAction) { - BasicInsertString(actionStep.position, actionStep.data, actionStep.lenData, true); + BasicInsertString(actionStep.position, actionStep.data, actionStep.lenData); } uh.CompletedUndoStep(); } @@ -1089,14 +898,11 @@ void CellBuffer::PerformRedoStep() { const Action &actionStep = uh.GetRedoStep(); if (actionStep.at == insertAction) { - BasicInsertString(actionStep.position, actionStep.data, actionStep.lenData, false); + BasicInsertString(actionStep.position, actionStep.data, actionStep.lenData); } else if (actionStep.at == removeAction) { - BasicDeleteChars(actionStep.position, actionStep.lenData, false); + BasicDeleteChars(actionStep.position, actionStep.lenData); } uh.CompletedRedoStep(); - if (IsSavePoint()) { - lv.SetSavePoint(); - } } int CellBuffer::SetLineState(int line, int state) { --- src/CellBuffer.h Tue Jan 20 09:26:36 1970 +++ src/CellBuffer.h Tue Jan 20 09:26:36 1970 @@ -41,25 +41,6 @@ void CombineWith(MarkerHandleSet *other); }; -class LineChanges { - bool collecting; - RunStyles state; - int edition; -public: - LineChanges(); - ~LineChanges(); - void AdvanceEdition(); - int GetEdition() const; - char *PersistantForm() const; - void SetChanges(const char *changesState); - void InsertText(int line, int edition, bool undoing); - void InsertLine(int line, bool undoing); - void RemoveLine(int line, bool undoing); - void EnableChangeCollection(bool collecting_, int lines); - void ClearChanged(); - int GetChanged(int line) const; -}; - /** * The line vector contains information about each of the lines in a cell buffer. */ @@ -70,7 +51,6 @@ SplitVector levels; /// Handles are allocated sequentially and should never have to be reused as 32 bit ints are very big. int handleCurrent; - LineChanges changes; public: @@ -83,10 +63,10 @@ int SetLevel(int line, int level); int GetLevel(int line); - void InsertText(int line, int delta, int edition, bool undoing); - void InsertLine(int line, int position, bool undoing); + void InsertText(int line, int delta); + void InsertLine(int line, int position); void SetLineStart(int line, int position); - void RemoveLine(int line, bool undoing); + void RemoveLine(int line); int Lines() const { return starts.Partitions(); } @@ -101,14 +81,6 @@ void DeleteMark(int line, int markerNum, bool all); void DeleteMarkFromHandle(int markerHandle); int LineFromHandle(int markerHandle); - - void EnableChangeCollection(bool changesCollecting_); - int GetChanged(int line) const; - void SetSavePoint(); - int GetChangesEdition() const; - void PerformingUndo(bool undo); - char *PersistantForm() const; - void SetChanges(const char *changesState); }; enum actionType { insertAction, removeAction, startAction }; @@ -141,8 +113,6 @@ int currentAction; int undoSequenceDepth; int savePoint; - int savePointEffective; - int **changeActions; void EnsureUndoRoom(); @@ -150,21 +120,17 @@ UndoHistory(); ~UndoHistory(); - void AppendAction(actionType at, int position, char *data, int length, bool &startSequence, char *persistantChanges); + void AppendAction(actionType at, int position, char *data, int length, bool &startSequence); void BeginUndoAction(); void EndUndoAction(); void DropUndoSequence(); void DeleteUndoHistory(); - void DeleteChangeHistory(); - void EnableChangeHistory(bool enable); - /// The save point is a marker in the undo stack where the container has stated that /// the buffer was saved. Undo and redo can move over the save point. void SetSavePoint(); bool IsSavePoint() const; - bool BeforeSavePointEffective(int action) const; /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is /// called that many times. Similarly for redo. @@ -172,13 +138,10 @@ int StartUndo(); const Action &GetUndoStep() const; void CompletedUndoStep(); - char *GetChangesStep() const; bool CanRedo() const; int StartRedo(); const Action &GetRedoStep() const; void CompletedRedoStep(); - - int Edition() const; }; /** @@ -214,8 +177,8 @@ int Lines() const; int LineStart(int line) const; int LineFromPosition(int pos) { return lv.LineFromPosition(pos); } - void InsertLine(int line, int position, bool undoing); - void RemoveLine(int line, bool undoing); + void InsertLine(int line, int position); + void RemoveLine(int line); const char *InsertString(int position, const char *s, int insertLength, bool &startSequence); /// Setting styles for positions outside the range of the buffer is safe and has no effect. @@ -241,19 +204,15 @@ void DeleteAllMarks(int markerNum); int LineFromHandle(int markerHandle); - void EnableChangeCollection(bool changesCollecting_); - int GetChanged(int line) const; - int GetChangesEdition() const; - /// Actions without undo - void BasicInsertString(int position, const char *s, int insertLength, bool undoing); - void BasicDeleteChars(int position, int deleteLength, bool undoing); + void BasicInsertString(int position, const char *s, int insertLength); + void BasicDeleteChars(int position, int deleteLength); bool SetUndoCollection(bool collectUndo); bool IsCollectingUndo(); void BeginUndoAction(); void EndUndoAction(); - void DeleteUndoHistory(bool collectChangeHistory); + void DeleteUndoHistory(); /// To perform an undo, StartUndo is called to retrieve the number of steps, then UndoStep is /// called that many times. Similarly for redo. --- src/Document.cxx Tue Jan 20 09:26:36 1970 +++ src/Document.cxx Tue Jan 20 09:26:36 1970 @@ -105,11 +105,7 @@ } void Document::SetSavePoint() { - int changesEdition = cb.GetChangesEdition(); cb.SetSavePoint(); - if (cb.GetChangesEdition() != changesEdition) { - NotifyModified(DocModification(SC_MOD_CHANGEMARKER, 0, 0, 0, 0, -1)); - } NotifySavePoint(true); } @@ -437,8 +433,6 @@ SC_MOD_BEFOREDELETE | SC_PERFORMED_USER, pos, len, 0, 0)); - - int changesEdition = cb.GetChangesEdition(); int prevLinesTotal = LinesTotal(); bool startSavePoint = cb.IsSavePoint(); bool startSequence = false; @@ -449,11 +443,9 @@ ModifiedAt(pos); else ModifiedAt(pos-1); - int changeBarFlags = (cb.GetChangesEdition() == changesEdition) ? - 0 : SC_MOD_CHANGEMARKER | SC_MOD_CHANGEFOLD; NotifyModified( DocModification( - SC_MOD_DELETETEXT | SC_PERFORMED_USER | (startSequence?SC_STARTACTION:0) | changeBarFlags, + SC_MOD_DELETETEXT | SC_PERFORMED_USER | (startSequence?SC_STARTACTION:0), pos, len, LinesTotal() - prevLinesTotal, text)); } @@ -480,8 +472,6 @@ SC_MOD_BEFOREINSERT | SC_PERFORMED_USER, position, insertLength, 0, s)); - - int changesEdition = cb.GetChangesEdition(); int prevLinesTotal = LinesTotal(); bool startSavePoint = cb.IsSavePoint(); bool startSequence = false; @@ -489,11 +479,9 @@ if (startSavePoint && cb.IsCollectingUndo()) NotifySavePoint(!startSavePoint); ModifiedAt(position); - int changeBarFlags = (cb.GetChangesEdition() == changesEdition) ? - 0 : SC_MOD_CHANGEMARKER | SC_MOD_CHANGEFOLD; NotifyModified( DocModification( - SC_MOD_INSERTTEXT | SC_PERFORMED_USER | (startSequence?SC_STARTACTION:0) | changeBarFlags, + SC_MOD_INSERTTEXT | SC_PERFORMED_USER | (startSequence?SC_STARTACTION:0), position, insertLength, LinesTotal() - prevLinesTotal, text)); } @@ -510,7 +498,6 @@ if (!cb.IsReadOnly()) { bool startSavePoint = cb.IsSavePoint(); bool multiLine = false; - int changesEdition = cb.GetChangesEdition(); int steps = cb.StartUndo(); //Platform::DebugPrintf("Steps=%d\n", steps); for (int step = 0; step < steps; step++) { @@ -546,9 +533,6 @@ if (multiLine) modFlags |= SC_MULTILINEUNDOREDO; } - int changeBarFlags = (cb.GetChangesEdition() == changesEdition) ? - 0 : SC_MOD_CHANGEMARKER | SC_MOD_CHANGEFOLD; - modFlags |= changeBarFlags; NotifyModified(DocModification(modFlags, cellPosition, action.lenData, linesAdded, action.data)); } @@ -570,7 +554,6 @@ if (!cb.IsReadOnly()) { bool startSavePoint = cb.IsSavePoint(); bool multiLine = false; - int changesEdition = cb.GetChangesEdition(); int steps = cb.StartRedo(); for (int step = 0; step < steps; step++) { const int prevLinesTotal = LinesTotal(); @@ -603,9 +586,6 @@ if (multiLine) modFlags |= SC_MULTILINEUNDOREDO; } - int changeBarFlags = (cb.GetChangesEdition() == changesEdition) ? - 0 : SC_MOD_CHANGEMARKER | SC_MOD_CHANGEFOLD; - modFlags |= changeBarFlags; NotifyModified( DocModification(modFlags, action.position, action.lenData, linesAdded, action.data)); --- src/Document.h Tue Jan 20 09:26:36 1970 +++ src/Document.h Tue Jan 20 09:26:36 1970 @@ -150,7 +150,7 @@ int Redo(); bool CanUndo() { return cb.CanUndo(); } bool CanRedo() { return cb.CanRedo(); } - void DeleteUndoHistory(bool collectChangeHistory) { cb.DeleteUndoHistory(collectChangeHistory); } + void DeleteUndoHistory() { cb.DeleteUndoHistory(); } bool SetUndoCollection(bool collectUndo) { return cb.SetUndoCollection(collectUndo); } @@ -199,7 +199,6 @@ void ClearLevels() { cb.ClearLevels(); } int GetLastChild(int lineParent, int level=-1); int GetFoldParent(int line); - int GetChanged(int line) { return cb.GetChanged(line); } void Indent(bool forwards); int ExtendWordSelect(int pos, int delta, bool onlyWordCharacters=false); --- src/Editor.cxx Tue Jan 20 09:26:36 1970 +++ src/Editor.cxx Tue Jan 20 09:26:36 1970 @@ -1541,10 +1541,6 @@ PLATFORM_ASSERT(cs.GetVisible(lineDoc)); bool firstSubLine = visibleLine == cs.DisplayFromDoc(lineDoc); - PRectangle rcMarker = rcSelMargin; - rcMarker.top = yposScreen; - rcMarker.bottom = yposScreen + vs.lineHeight; - // Decide which fold indicator should be displayed level = pdoc->GetLevel(lineDoc); int levelNext = pdoc->GetLevel(lineDoc + 1); @@ -1608,13 +1604,10 @@ } } - int changed = pdoc->GetChanged(lineDoc); - if (changed == 1) - marks |= 1 << SC_MARKNUM_CHANGEUNSAVED; - if (changed == 2) - marks |= 1 << SC_MARKNUM_CHANGESAVED; - marks &= vs.ms[margin].mask; + PRectangle rcMarker = rcSelMargin; + rcMarker.top = yposScreen; + rcMarker.bottom = yposScreen + vs.lineHeight; if (vs.ms[margin].style == SC_MARGIN_NUMBER) { char number[100]; number[0] = '\0'; @@ -5986,7 +5979,7 @@ return (pdoc->CanUndo() && !pdoc->IsReadOnly()) ? 1 : 0; case SCI_EMPTYUNDOBUFFER: - pdoc->DeleteUndoHistory(true); + pdoc->DeleteUndoHistory(); return 0; case SCI_GETFIRSTVISIBLELINE: --- src/LineMarker.cxx Tue Jan 20 09:26:36 1970 +++ src/LineMarker.cxx Tue Jan 20 09:26:36 1970 @@ -299,10 +299,6 @@ }; surface->Polygon(pts, sizeof(pts) / sizeof(pts[0]), fore.allocated, back.allocated); - } else if (markType == SC_MARK_LEFTRECT) { - PRectangle rcLeft = rcWhole; - rcLeft.right = rcLeft.left + 4; - surface->FillRectangle(rcLeft, back.allocated); } else { // SC_MARK_FULLRECT surface->FillRectangle(rcWhole, back.allocated); } --- src/RunStyles.cxx Tue Jan 20 09:26:36 1970 +++ src/RunStyles.cxx Tue Jan 20 09:26:36 1970 @@ -77,11 +77,11 @@ styles = NULL; } -int RunStyles::Length() const { +int RunStyles::Length() { return starts->PositionFromPartition(starts->Partitions()); } -int RunStyles::ValueAt(int position) const { +int RunStyles::ValueAt(int position) { return styles->ValueAt(starts->PartitionFromPosition(position)); } @@ -214,43 +214,3 @@ } } -char *RunStyles::PersistantForm() const { - int len = starts->Partitions(); - char *form = new char[(len * 2 + 1) * sizeof(int)]; - int *data = reinterpret_cast(form); - data[0] = len; - for (int i=0;iPositionFromPartition(i+1) - starts->PositionFromPartition(i); - data[i*2+2] = styles->ValueAt(i); - } - return form; -} - -void RunStyles::FromPersistant(const char *form) { - DeleteAll(); - const int *data = reinterpret_cast(form); - int len = data[0]; - int pos = 0; - for (int i=0;i(form1); - const int *data2 = reinterpret_cast(form2); - if (data1[0] != data2[0]) - return false; - int len = data1[0]; - for (int i=1;i