[TxMt] Re: Cursor position in bytes
Allan Odgaard
mailinglist at textmate.org
Wed Aug 10 07:47:45 UTC 2016
On 10 Aug 2016, at 8:45, Jacob Carlborg wrote:
> > On 09 Aug 2016, at 20:59, Allan Odgaard <mailinglist at textmate.org>
> wrote:
>>
>> We can provide this as a variable but the user can have multiple
>> insertion points, column selections, and place carets beyond
>> end-of-line or a tab character.
>>
>> Any suggestion as for how to provide this info?
>
> I was thinking a new environment variable. Is it any different than
> TM_LINE_NUMBER?
The “line number” does not need to care about most of what I
mentioned above, ideally it would reflect when there are carets on
multiple lines, but as the variable was introduced before this was a
feature, we cannot extend the format without breaking existing stuff and
instead a new variable was introduced with exact information
(`TM_SELECTION`).
The format of `TM_SELECTION` is:
selection = <range> ('&' <range>)*
range = <pos> | <normal_range> | <column_range>
pos = <line> (':' <column>)? ('+' <offset>)?
normal_range = <pos> '-' <pos>
column_range = <pos> 'x' <pos>
line = [1-9][0-9]*
column = [1-9][0-9]*
offset = [1-9][0-9]*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20160810/1f91dce1/attachment.html>
More information about the textmate
mailing list