-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Syntax for line:col jumps in QuickOpen search queries #5612
Conversation
And now, I am the one with no time. And I don't even remember much about the original PR. If someone else has time to check this PR, that would be great. If not I could try and check it in a few weeks. Sorry for the delay. |
@TomMalbran No problem, I don't think there's anyone rooting or waiting for this anyway ;) Actually, I was thinking that maybe we'd like to just leave it out and consolidate this card in the broader Quick Open Trello story. @peterflynn What do you think? |
@@ -55,6 +55,8 @@ define(function (require, exports, module) { | |||
ViewUtils = require("utils/ViewUtils"); | |||
|
|||
|
|||
var cursorPosRegExp = new RegExp(":([^,]+)?(,(.+)?)?"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This still requires Docs, to know what is this RegExp for, and to mark it as a constant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or since is used only in extractCursorPos
, maybe it could just be a variable there?
I did just a review of the code. I have to go now. I will try to later test it and check the tests. |
@jbalsas Sorry for the late reply. The tests look good and so does the code besides the comments I made before. But I wasn't able to test since Brackets fails to open. Could you merge with master? I can then do a final test and we can finally merge this :) |
@jbalsas I just merged and tested it and it works great. Besides some minor nits, my only concern is if we should show an error when the user selects a column greater than the maximum columns in the line, since there is no visual indication in the editor as to what is happening. If you are busy I could fix the nits and merge it. CC @larz0 to consider if we should show an error when the given column is greater than the columns in the line. |
@TomMalbran I like the current behavior, i.e. cursor stays on the last column. It's obvious that it can't go beyond that and people that use this feature will know this. |
Cool. I guess I could then fix the small nits and merge it :) |
Schweet~ |
Fixed the nits and finally merging this. Woot :) |
Syntax for line:col jumps in QuickOpen search queries
Hey, @TomMalbran, this overtakes #3238. I finally got around this long forgotten pull request. I've cherry-picked the old commits on top of master and added some tests. I may be a little bit rusty, so please, check if everything's in there or if I missed something.
@peterflynn @dangoor I've seen that the test gave some issues in the past, so you may want to check it out