Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Syntax for line:col jumps in QuickOpen search queries #5612

Merged
merged 6 commits into from
Jan 19, 2014

Conversation

jbalsas
Copy link
Contributor

@jbalsas jbalsas commented Oct 21, 2013

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

@TomMalbran
Copy link
Contributor

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.

@jbalsas
Copy link
Contributor Author

jbalsas commented Nov 13, 2013

@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(":([^,]+)?(,(.+)?)?");
Copy link
Contributor

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.

Copy link
Contributor

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?

@TomMalbran
Copy link
Contributor

I did just a review of the code. I have to go now. I will try to later test it and check the tests.

@TomMalbran
Copy link
Contributor

@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 :)

@TomMalbran
Copy link
Contributor

@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.

@larz0
Copy link
Member

larz0 commented Jan 19, 2014

@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.

@TomMalbran
Copy link
Contributor

Cool. I guess I could then fix the small nits and merge it :)

@larz0
Copy link
Member

larz0 commented Jan 19, 2014

Schweet~

@TomMalbran
Copy link
Contributor

Fixed the nits and finally merging this. Woot :)

TomMalbran added a commit that referenced this pull request Jan 19, 2014
Syntax for line:col jumps in QuickOpen search queries
@TomMalbran TomMalbran merged commit 734c236 into master Jan 19, 2014
@TomMalbran TomMalbran deleted the jbalsas/quickopen_cols branch January 19, 2014 06:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants