You are here: PSPad forum > Bug report / Hlášení chyb > replace in block selection
Posted by: Peter.eisentraeger | Date: 2020-05-29 13:07 | IP: IP Logged
I'm using 5.0.3 (377)
First issue: replace a string with a longer string:
My text looks like:
r,7201,1,1,1,1,1,1 ! Quadrant 1
r,7202,1,1,1,1,1,1 ! Quadrant 2
r,7203,1,1,1,1,1,1 ! Quadrant 3
r,7204,1,1,1,1,1,1 ! Quadrant 4
^ ^
When I block select columns 8 to 18 and replace all "1" by "0.1" I get:
r,7201,0.1,0.1,0.1,1,1,1 ! Quadrant 1
r,7202,0.1,0.1,0.1,1,1,1 ! Quadrant 2
r,7203,0.1,0.1,0.1,1,1,1 ! Quadrant 3
r,7204,0.1,0.1,0.1,1,1,1 ! Quadrant 4
only 3 of the selected "1" are replaced
Second issue: replace a string with a shorter string:
When my code looks this:
r,7201,0.1,0.1,0.1,0.1,0.1,0.1 ! Quadrant 1
r,7202,0.1,0.1,0.1,0.1,0.1,0.1 ! Quadrant 2
r,7203,0.1,0.1,0.1,0.1,0.1,0.1 ! Quadrant 3
r,7204,0.1,0.1,0.1,0.1,0.1,0.1 ! Quadrant 4
^ ^
When I block select columns 8 to 18 and replace all "0.1" by "1" I get:
r,7201,1,1,1,1,1,0.1 ! Quadrant 1
r,7202,1,1,1,1,1,0.1 ! Quadrant 2
r,7203,1,1,1,1,1,0.1 ! Quadrant 3
r,7204,1,1,1,1,1,0.1 ! Quadrant 4
only 5 of the selected "0.1" are replaced
Posted by: pspad | Date: 2020-05-29 15:11 | IP: IP Logged
Thank you for information.
I guess authors of the editor component don't count with column block replacing.
When you replace, replaced text will move rest of the line outside of block.
From my opinion, I see big problem with column block and replacing with confirmation. How it should behive, when you start replace and confirm one by one. The column block is defined before, it can't "increase" in replacing process and have different size for each line.
You can use workarround and replace with backward direction.
Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR