Closed flmng0 closed 1 year ago
fixed in 7c72b03113fcd3dc5b53c3c0a29db307e178600a
From here onwards, this issue becomes more of a feature request; it would be nice if -n was translated into #val - n for text types.
implemented in d9e4a76ef7181b0303e26dc03a910cc14c934dcd -2 is 1 character from the end, -3 is 2, etc because "-1" is maintained as "to the end" by convention
When doing highlight ranges for an element, if the end is set to -1, it will fail if the text has any margin, or is centred.
After some investigation, I found that this is because
left
is always added to the end, inalpha.highlight
.It should be, if the end is
-1
, then it should be passed to thehl_tbl
as-1
From here onwards, this issue becomes more of a feature request; it would be nice if
-n
was translated into#val - n
for text types.Would not be to hard to implement, I believe. I may even make a pull request later, unfortunately I'm not at a computer ATM though.