Closed sogaiu closed 2 years ago
This is a guess, but may be this occurs because column!
indirectly relies on a peg which might require that there is an end of line indicator: https://github.com/saikyun/freja/blob/700137587b450ae504c5f981a991be9e3fc3ee30/freja/new_gap_buffer.janet#L1268
The case that reproduces above is the first line and the position of the cursor is before all newlines in the buffer.
Perhaps if peg/match
fails here: https://github.com/saikyun/freja/blob/700137587b450ae504c5f981a991be9e3fc3ee30/freja/new_gap_buffer.janet#L1277 a little bit more processing could happen here: https://github.com/saikyun/freja/blob/700137587b450ae504c5f981a991be9e3fc3ee30/freja/new_gap_buffer.janet#L1279 before settling on a final number.
Should be fixed with a1661157eca47c2bdae3ba199a83a15ac1c856c1 Please try it :)
Seems to be working better :)
TYVM!
Nice :D
Den tis 15 feb. 2022 14:02sogaiu @.***> skrev:
Closed #60 https://github.com/saikyun/freja/issues/60.
— Reply to this email directly, view it on GitHub https://github.com/saikyun/freja/issues/60#event-6074759160, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAS46Z6BXHMGIJ25VIMUULDU3JFF7ANCNFSM5M57GXLQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
With freja at commit: 700137587b450ae504c5f981a991be9e3fc3ee30 and the following as the editor buffer content:
and the cursor at the end of the first line, evaluating:
via
eval-expr-dialog
(default hotkey ctrl-shift-e), yields0
here.The value I expected was non-zero, or the column number corresponding to the last cursor position(?) of the first line. I think that should be
36
in this case.With the cursor at the end of some other lines (e.g. the second or third line) I get values that appear to make sense.
20
for the second line and37
for the third line.