Menu

#237 Adapt the size of the selected region when a search-and-replace reduce it

9.2
closed
nobody
None
RFE
Core
minor
2020-12-11
2020-07-15
No

Suppose the following document, with six "\n\n" patterns:

x

x

x

z

z

z

And suppose the six first lines (from the first "x" to the line before the first "z") selected. If I run "Search and replace", check "Only in selection", and replace "\n\n" by "\n", I reduce the number of lines in the region. However, the region selected by Alpha keep its previous size, and then now encompass lines with "z". This prevent me from applying a succession of string replacements that can change the region size. Maybe it's possible to have the replacement function track the number of lines added (or removed), and change the region size accordingly? Maybe it's not easy...

All the best,
Sylvain

Discussion

  • Bernard Desgraupes

    Hi Sylvain,
    thanks for reporting. I'll fix this, it should not be difficult.

     
  • Bernard Desgraupes

    This is fixed now. Changes committed to the repository (rev. 1978).

     
  • Bernard Desgraupes

    • status: open --> fixed
     
  • Bernard Desgraupes

    • status: fixed --> closed
    • Version: 9.1.3 --> 9.2
     

Log in to post a comment.