[BUG_FIXED] (Author: mittmemo) Fix Auto-indent in new code block not respecting current EOL bug.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1339 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
c922089e28
commit
9db6d61b2c
@ -2363,7 +2363,15 @@ void Notepad_plus::maintainIndentation(TCHAR ch)
|
||||
{
|
||||
if (nextChar == '}')
|
||||
{
|
||||
_pEditView->execute(SCI_INSERTTEXT, _pEditView->execute(SCI_GETCURRENTPOS), (LPARAM)"\r\n");
|
||||
char *eolChars;
|
||||
if (eolMode == SC_EOL_CRLF)
|
||||
eolChars = "\r\n";
|
||||
else if (eolMode == SC_EOL_LF)
|
||||
eolChars = "\n";
|
||||
else
|
||||
eolChars = "\r";
|
||||
|
||||
_pEditView->execute(SCI_INSERTTEXT, _pEditView->execute(SCI_GETCURRENTPOS), (LPARAM)eolChars);
|
||||
_pEditView->setLineIndent(curLine + 1, indentAmountPrevLine);
|
||||
}
|
||||
_pEditView->setLineIndent(curLine, indentAmountPrevLine + tabWidth);
|
||||
|
Loading…
Reference in New Issue
Block a user