mirror of
https://github.com/jarun/nnn.git
synced 2024-12-01 02:49:44 +00:00
Return selection if external selection exists
This commit is contained in:
parent
802a7794ae
commit
714d806341
|
@ -1280,7 +1280,7 @@ static int get_cur_or_sel(void)
|
|||
return ((choice == 'c' || choice == 's') ? choice : 0);
|
||||
}
|
||||
|
||||
if (selbufpos)
|
||||
if (selbufpos || !isselfileempty())
|
||||
return 's';
|
||||
|
||||
if (ndents)
|
||||
|
@ -1519,7 +1519,7 @@ static int editselection(void)
|
|||
struct stat sb;
|
||||
time_t mtime;
|
||||
|
||||
if (!selbufpos)
|
||||
if (!selbufpos) /* External selection is only editable at source */
|
||||
return listselfile();
|
||||
|
||||
fd = create_tmp_file();
|
||||
|
|
Loading…
Reference in a new issue