Optimize invert further

This commit is contained in:
Arun Prakash Jana 2021-07-15 02:06:11 +05:30
parent 61d8a29d84
commit 9526fb7612
No known key found for this signature in database
GPG Key ID: A75979F35C080412
1 changed files with 3 additions and 0 deletions

View File

@ -1595,6 +1595,9 @@ static void invertselbuf(char *path)
len = mkpath(path, dentp->name, g_buf);
found = findinsel(findselpos, len);
if (found) {
if (findselpos == found)
findselpos += len;
if (nmarked && (found
== (marked[nmarked - 1].startpos + marked[nmarked - 1].len)))
marked[nmarked - 1].len += len;