Skip to content

Commit

Permalink
Preserve the locked state when reopening editor from history
Browse files Browse the repository at this point in the history
  • Loading branch information
alabuzhev committed Jul 13, 2021
1 parent 980cfe6 commit 775633e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
5 changes: 5 additions & 0 deletions far/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
--------------------------------------------------------------------------------
drkns 13.07.2021 20:22:19 +0100 - build 5849

4. Preserve the locked state when reopening editor from history.

--------------------------------------------------------------------------------
drkns 12.07.2021 20:53:26 +0100 - build 5848

Expand Down
9 changes: 5 additions & 4 deletions far/cmdline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -869,10 +869,11 @@ void CommandLine::ShowViewEditHistory()
case HR_EDITOR_RO:
{
// пусть файл создается
const auto FEdit = FileEditor::create(strStr, CP_DEFAULT, FFILEEDIT_CANNEWFILE | FFILEEDIT_ENABLEF6);

if (Type == HR_EDITOR_RO)
FEdit->SetLockEditor(true);
const auto FEdit = FileEditor::create(
strStr,
CP_DEFAULT,
FFILEEDIT_CANNEWFILE | FFILEEDIT_ENABLEF6 | (Type == HR_EDITOR_RO? FFILEEDIT_LOCKED : 0)
);

break;
}
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5848
5849

0 comments on commit 775633e

Please sign in to comment.