Return selection if external selection exists

This commit is contained in:
Arun Prakash Jana 2021-04-28 13:37:03 +05:30
parent 802a7794ae
commit 714d806341
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -1280,7 +1280,7 @@ static int get_cur_or_sel(void)
return ((choice == 'c' || choice == 's') ? choice : 0); return ((choice == 'c' || choice == 's') ? choice : 0);
} }
if (selbufpos) if (selbufpos || !isselfileempty())
return 's'; return 's';
if (ndents) if (ndents)
@ -1519,7 +1519,7 @@ static int editselection(void)
struct stat sb; struct stat sb;
time_t mtime; time_t mtime;
if (!selbufpos) if (!selbufpos) /* External selection is only editable at source */
return listselfile(); return listselfile();
fd = create_tmp_file(); fd = create_tmp_file();