diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index 12e84d3fa..e7cc8d03f 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -1815,8 +1815,14 @@ void Notepad_plus::command(int id) : (id == IDM_FORMAT_TOUNIX) ? EolType::unix : EolType::macos; Buffer* buf = _pEditView->getCurrentBuffer(); - buf->setEolFormat(newFormat); - _pEditView->execute(SCI_CONVERTEOLS, static_cast(buf->getEolFormat())); + + if (not buf->isReadOnly()) + { + LongRunningOperation op; + buf->setEolFormat(newFormat); + _pEditView->execute(SCI_CONVERTEOLS, static_cast(buf->getEolFormat())); + } + break; }