From f3303ce00a1faa900d4a975dc73d627f180055ca Mon Sep 17 00:00:00 2001 From: Don Ho Date: Fri, 29 Aug 2014 07:36:51 +0000 Subject: [PATCH] [BUG_FIXED] Fix comment command bug for Fortran: the comment symbols should be set on the first column. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1275 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index efdc281e3..6a035278e 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -3554,7 +3554,10 @@ bool Notepad_plus::doBlockComment(comment_mode currCommentMode) size_t linebufferSize = lineEnd - lineStart + 2; TCHAR* linebuf = new TCHAR[linebufferSize]; - lineIndent = _pEditView->execute(SCI_GETLINEINDENTPOSITION, i); + Lang *lang = _pEditView->getCurrentBuffer()->getCurrentLang(); + bool isFortran = lang == NULL?false:lang->_langID == L_FORTRAN; + if (!isFortran) + lineIndent = _pEditView->execute(SCI_GETLINEINDENTPOSITION, i); _pEditView->getGenericText(linebuf, linebufferSize, lineIndent, lineEnd); generic_string linebufStr = linebuf;