wgrep fails with swiper + ivy-occur in a narrowed buffer #1848
There are times that I edit texts in a narrowed buffer,
For example, I have a
I narrow the buffer to the last two lines:
And do an occur with
I suspect it's because the line number parts of the occur buffer are wrong when being narrowed.
I've verified that it exists with the latest version from melpa with a clean
The text was updated successfully, but these errors were encountered:
that is correct. However I don't see an easy way to fix this because if we just get the real numbers it will prevent us from using "RET" to jump to that line, at least not without a lot of translation.
If this is a big part of your workflow you can check out
* swiper.el (swiper--occur-cands): Extract and add `line-delta' logic. (swiper-occur): Update. (swiper--action): Use `swiper--point-min' only when the buffer is narrowed. Fixes abo-abo#1848