[TxMt] Re: Cursor position in bytes

Jacob Carlborg doob at me.com
Wed Aug 10 10:33:33 UTC 2016


> On 10 Aug 2016, at 09:47, Allan Odgaard <mailinglist at textmate.org> wrote:
> 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]*


Sorry, I was actually thinking of the TM_LINE_INDEX environment variable. But perhaps the answer is the same anyway.

--
/Jacob Carlborg

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20160810/ed08f21e/attachment.html>


More information about the textmate mailing list