Returning to current line in "R.app & Step" does not work #5

Closed
gabrakadabra opened this Issue Aug 24, 2012 · 5 comments

Comments

Projects
None yet
4 participants

The last line

open "txmt://open?line=$(($TM_LINE_NUMBER+1))&column=1000000" &

is not working. It looks like TM_LINE_NUMBER does not return a line number as I always return from R on line 1.
Any suggestions?

Bibiko commented Aug 24, 2012

On Aug 24, 2012, at 11:26 AM, gabrakadabra wrote:

The last line

open "txmt://open?line=$(($TM_LINE_NUMBER+1))&column=1000000" &

is not working. It looks like TM_LINE_NUMBER does not return a line number as I always return from R on line 1.
Any suggestions?

Which version of TextMate/Mac OSX do you're using?

This bug was recently fixed. With TM 2.0 (9289) it works fine on 10.7.4.

Cheers,
--Hans

Hi. Thank you for your quick response.

Which version of TextMate/Mac OSX do you're using?

10.8.1 and TM 2.0 (9289)

I'm using the bundle included in text mate.

/Gabriel

The command works fine for sending one line but fails to return to (the last line +1) when I use the command on a selection.

/Gabriel

Contributor

statuser commented Dec 6, 2013

Bump. I'm seeing the same issue as Gabriel on OS X 1.8.5 and TextMate 2.0-alpha.9495. It looks like TM_LINE_NUMBER Does not return a line number when multiple lines are selected.

Owner

infininight commented Dec 7, 2013

Correct, as there are multiple lines there is no way to return a specific line so TextMate won't even set that variable. This would also be the case with multiple cursors. The best work-around would be to use TM_SELECTION as a fallback in this case, this returns a lot of info but all you would need to extract is the first line mentioned to get a good idea of what line to link to. (You can see the syntax in TextMate help → Selection String Syntax.)

statuser added a commit to statuser/r.tmbundle that referenced this issue Dec 8, 2013

Fixed issue #5: Returning to current line in "R.app & Step" does not …
…work.

Previously only handled the case where caret was on line.  Now handles the case where a selection is submitted.  Both standard selections and block (option) selections.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment