From 05a2ea25e0d340a68aca1b28fdfbf2b4c6aa5de3 Mon Sep 17 00:00:00 2001 From: nyamatongwe Date: Wed, 26 Jul 2000 04:56:54 +0000 Subject: Added history entry for 1.30. Included Ralf's soft tab patch. --- src/Editor.cxx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Editor.cxx b/src/Editor.cxx index f3aac824f..f70826473 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -2226,9 +2226,15 @@ void Editor::Indent(bool forwards) { int lineCurrentPos = pdoc->LineFromPosition(currentPos); if (lineOfAnchor == lineCurrentPos) { ClearSelection(); - pdoc->InsertChar(currentPos, '\t'); - //pdoc->InsertChar(currentPos++, '\t'); - SetEmptySelection(currentPos + 1); + if (pdoc->useTabs) { + pdoc->InsertChar(currentPos, '\t'); + SetEmptySelection(currentPos + 1); + } else { + for (int i=0; itabInChars; i++){ + pdoc->InsertChar(currentPos, ' '); + } + SetEmptySelection(currentPos + pdoc->tabInChars); + } } else { int anchorPosOnLine = anchor - pdoc->LineStart(lineOfAnchor); int currentPosPosOnLine = currentPos - pdoc->LineStart(lineCurrentPos); -- cgit v1.2.3