jed-users mailing list

[2026 Date Index] [2026 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [jed-users] Confusing behavior of transpose_lines


* Rafael Laboissière <rafael@xxxxxxxxxx> [2026-01-03 14:47]:

This bug report has been filed against the Debian package for jed: https://bugs.debian.org/1124550

While I don't believe it to be a harmful bug, the outcome of the transpose_lines command is prone to confusion.

I narrowed down the problem. The behavior of transpose_lines is normal in version pre0.99.20-183. However, in version pre0.99.20-186, transpose_lines scrolls down the buffer, causing the first line to disappear from the window.

By the way, I found another way to expose the strange scroll behavior:

Create a file with this content:

 1
 2
 3
 4
 5
 6

Open it in JED and go to the beginning of the buffer (line "1"). Set the mrk (Ctrl-Space), go down two lines (to line "3"), copy the region (ESC-w) and yank the region (Ctrl-y). In version pre0.99.20-183, the behavior is normal. In version pre0.99.20-186, however, the buffer scrolls up two lines.

Best,

Rafael

P.S.: I have noticed another thing that might be worth discussing regarding the transpose_* functions. There are a transpose_chars and a transpose_lines functions. There is also a swap_words function. For consistency's sake, should not the latter be named transpose_words? Furthermore, these functions do not behave consistently. After being executed, the transpose_chars and transpose_lines both position the cursor after the second transposed element. However, the swap_words function positions the cursor between the two transposed elements.
_______________________________________________
For list information, visit <http://jedsoft.org/jed/mailinglists.html>.


[2026 date index] [2026 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]