<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">I’m trying to add some missing functionality to a bundle and stumbled upon some odd behavior of the selection string in TM_SELECTION regarding the range…<div><br></div><div>When I select a block of text and my cursor is somewhere in the middle of a line, the selection string contains exactly the highlighted range. Consider the following selection (see screenshot):</div><div><br></div><div><img apple-inline="yes" id="2400C14C-0E2F-4A80-84D1-F26E0F35011D" height="123" width="216" apple-width="yes" apple-height="yes" src="cid:580F9D7C-39AC-40BD-8C76-13A0AF29D276@boerding.local"></div><div><br></div><div>TM_SELECTION is now "5:5-3”, so lines 3-5 are included.</div><div><br></div><div>Example 2, column selection:</div><div><br></div><div><img apple-inline="yes" id="D63F63D2-7200-43DD-84C9-44ED44342590" height="126" width="216" apple-width="yes" apple-height="yes" src="cid:CD100840-09C1-4F87-A4F3-C62BF1E6BD12@boerding.local"></div><div><br></div><div>TM_SELECTION is “5x3”, lines 3-5 included.</div><div><br></div><div>But whenever I’m using CMD-L for “Select line”, like here, it gets somewhat problematic:</div><div><br></div><div><img apple-inline="yes" id="5DE60B4E-8593-4EC6-ACC3-1C25AA34DA35" height="123" width="217" apple-width="yes" apple-height="yes" src="cid:B29A7E85-ACE1-4989-BB40-B01AC94BDBD2@boerding.local"></div><div><br></div><div>TM_SELECTION is now "6-3”, the range now includes line 6, but the *visible* part of the selection is still 3-5.</div><div><br></div><div>I can work somewhat around this checking if the last character in TM_SELECTED_TEXT is a newline (\n) (because that is where the additional line in the range is coming from - as one can make the same selection in example 3 when the cursor is on the first row of line 6, holding shift and hitting UP 2 times. Standard OSX behavior). </div><div><br></div><div>But the more I think about it, the less I’m sure if this is intentional.</div><div><br></div><div>Can this be considered a bug or is it intended behavior / a feature?</div><div><br></div></body></html>