9fans / plan9port

Plan 9 from User Space
https://9fans.github.io/plan9port/
Other
1.64k stars 326 forks source link

Bug: Acme: Sam command language is inconsistent with Sam #672

Open spektrokalter opened 2 months ago

spektrokalter commented 2 months ago

Bug: Acme: Sam command language is inconsistent with Sam

Steps to reproduce the problem

Consider the following sample text:

?? hello
 A world
UU earth

The purpose is to replace the first two characters in each line with "git add".

Let's run the following command:

{
    x -#0+/../ c/git add/
    -#0,+#0
}

What does the -#0,+#0 do? In theory, I'm not sure. In Sam, it doesn't seem to do anything. In Acme, however, it tries to preserve the original selection (whether intentionally or not, I'm not sure). In this particular case, it does so successfully. In others, it fails.

But it is not expected, if we compare it with Sam's behavior.

plan9port version

a2567fcac9851e5cc965a236679f568b0e79cff2

OS version

macOS 14.5 (23F79)