Skip to content

Commit

Permalink
Refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
shmuz committed Jan 8, 2025
1 parent 7ae4b44 commit ceafa1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions far/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,11 @@ int _cdecl main(int argc, char *argv[])

if (strcmp(name, "far2medit") == 0) { // run by symlink in editor mode
Opt.OnlyEditorViewerUsed = Options::ONLY_EDITOR;
if (argc > 1 && *argv[argc - 1] != '-')
Opt.strEditViewArg = argv[argc - 1]; // use last argument
if (argc > 1 && *argv[1] != '-') {
Opt.strEditViewArg = argv[1]; // use the next argument
--argc;
memmove(argv+1, argv+2, argc*sizeof(char*));
}
}
else if (strcmp(name, "far2m_askpass") == 0)
return sudo_main_askpass();
Expand Down
2 changes: 1 addition & 1 deletion luafar/lua_share/far2/test/macrotest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ local function test_XPanel(pan) -- (@pan: either APanel or PPanel)
assert_eq (pan.CurPos, assert_num(panInfo.CurrentItem))
assert_eq (pan.Current, assert_str(curItem.FileName))
assert_num (pan.DriveType)
assert_eq (pan.Empty, panInfo.ItemsNumber==0)
assert_eq (pan.Empty, panInfo.ItemsNumber==1) -- an empty panel has a ".." item
assert_bool (pan.Eof)
assert_eq (pan.FilePanel, panInfo.PanelType==F.PTYPE_FILEPANEL)
assert_bool (pan.Filter)
Expand Down

0 comments on commit ceafa1f

Please sign in to comment.