dk / Prima

prima.eu.org
Other
106 stars 27 forks source link

Text editor deletion of empty line is weird #38

Closed run4flat closed 8 years ago

run4flat commented 8 years ago

Run the editor example script, typing the contents as shown below. Select the line ghi, including the newline: selection-pre-delete

Hitting delete, I get this result: post-delete

Notice that the contents of the line 123 are doubled. This is a true doubling of the contents of that line, the 123 actually appears twice in the text buffer after this operation.

Commenting out this line fixes the problem: https://github.com/dk/Prima/blob/058cfd5d89930adabd7ba3dad64b2ab0175f5519/Prima/Edit.pm#L2504

I'm sure that logic was put in there for a good reason, but I'm not sure what it is. Also, this is a problem I have experienced since writing App::Prima::REPL, so it's been around for a while. It is not due to the recent Bidi contributions.