[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possibly Weird Behavior Regarding First Lines Which are Invisible?
From: |
Jaft |
Subject: |
Possibly Weird Behavior Regarding First Lines Which are Invisible? |
Date: |
Fri, 2 Feb 2024 06:13:24 +0000 (UTC) |
So I have a buffer; let's say 9 lines. And I have a function which runs
(previous-line) (beginning-of-line 1) and said function is bound to a key
(let's say <up>).
So I apply a text-property of 'invisible using (pos-bol) of the first line and
(1+ (pos-eol)) in order to get the first line to disappear, like it's not even
there.
If I'm on line 3 and M-: my function, it does what I'd expect and (point) will
return the (pos-bol) of the second line. But, if I execute my function by
pressing <up> from line 3, (point) keeps returning back 1, the point of the
beginning of line 1 rather than the point at the beginning of line 2.
Is this expected behavior? I'd be less weirded out if running code through M-:
gave back similar results but I get what I'd expect to happen no matter what
code I run and only the unexpected behavior when running the exact same code
via a key binding.
I'm running version 29.1 (GTK+ version 3.24.37 but through the terminal; I
wouldn't expect these to affect anything as much as the Emacs version, though.
On Guix).
- Possibly Weird Behavior Regarding First Lines Which are Invisible?,
Jaft <=