mirror of
https://github.com/jarun/nnn.git
synced 2025-01-24 17:56:41 +00:00
Optimize invert further
This commit is contained in:
parent
61d8a29d84
commit
9526fb7612
|
@ -1595,6 +1595,9 @@ static void invertselbuf(char *path)
|
||||||
len = mkpath(path, dentp->name, g_buf);
|
len = mkpath(path, dentp->name, g_buf);
|
||||||
found = findinsel(findselpos, len);
|
found = findinsel(findselpos, len);
|
||||||
if (found) {
|
if (found) {
|
||||||
|
if (findselpos == found)
|
||||||
|
findselpos += len;
|
||||||
|
|
||||||
if (nmarked && (found
|
if (nmarked && (found
|
||||||
== (marked[nmarked - 1].startpos + marked[nmarked - 1].len)))
|
== (marked[nmarked - 1].startpos + marked[nmarked - 1].len)))
|
||||||
marked[nmarked - 1].len += len;
|
marked[nmarked - 1].len += len;
|
||||||
|
|
Loading…
Reference in a new issue