diff options
| author | nyamatongwe <devnull@localhost> | 2009-07-10 04:24:46 +0000 | 
|---|---|---|
| committer | nyamatongwe <devnull@localhost> | 2009-07-10 04:24:46 +0000 | 
| commit | f69c0d399c57d25cda78177a197a0b71d1dc5118 (patch) | |
| tree | 7dfdab1ffa28fd8f49bb447e5ecf7b3a240d92e9 /src/Document.cxx | |
| parent | 3eeaf52c92f9524044cf9d118ca3c92ea41769f5 (diff) | |
| download | scintilla-mirror-f69c0d399c57d25cda78177a197a0b71d1dc5118.tar.gz | |
Duplicate works on discontiguous selections by duplicating each selection.
UndoGroup class simplifies grouping actions together in the undo history.
Diffstat (limited to 'src/Document.cxx')
| -rw-r--r-- | src/Document.cxx | 6 | 
1 files changed, 2 insertions, 4 deletions
| diff --git a/src/Document.cxx b/src/Document.cxx index eca4511de..5fd2749a0 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -761,10 +761,9 @@ void Document::SetLineIndentation(int line, int indent) {  		CreateIndentation(linebuf, sizeof(linebuf), indent, tabInChars, !useTabs);  		int thisLineStart = LineStart(line);  		int indentPos = GetLineIndentPosition(line); -		BeginUndoAction(); +		UndoGroup ug(this);  		DeleteChars(thisLineStart, indentPos - thisLineStart);  		InsertCString(thisLineStart, linebuf); -		EndUndoAction();  	}  } @@ -871,7 +870,7 @@ char *Document::TransformLineEnds(int *pLenOut, const char *s, size_t len, int e  }  void Document::ConvertLineEnds(int eolModeSet) { -	BeginUndoAction(); +	UndoGroup ug(this);  	for (int pos = 0; pos < Length(); pos++) {  		if (cb.CharAt(pos) == '\r') { @@ -906,7 +905,6 @@ void Document::ConvertLineEnds(int eolModeSet) {  		}  	} -	EndUndoAction();  }  bool Document::IsWhiteLine(int line) const { | 
