From: KlzXS Date: Tue, 16 Feb 2021 21:33:42 +0000 (+0000) Subject: Add check for empty selection X-Git-Tag: v3.6~16^2 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=a27568824e7f04efeeac43e2a7fa06496288f84a;p=nnn.git Add check for empty selection nop when empty --- diff --git a/src/nnn.c b/src/nnn.c index e8b98de9..d4fa5d80 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -2084,6 +2084,11 @@ static bool cpmvrm_selection(enum action sel, char *path) { int r; + if (!selbufpos) { + printmsg(messages[MSG_0_SELECTED]); + return FALSE; + } + if (!selsafe()) return FALSE;