commit 714d806341b6a8d0c50613df0788cc1098ef6815
parent 802a7794aec1a854e5f5a53c4217c1f5260b0c65
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date: Wed, 28 Apr 2021 13:37:03 +0530
Return selection if external selection exists
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/nnn.c b/src/nnn.c
@@ -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();