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;