Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/search/QuickOpen.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ define(function (require, exports, module) {
* @private
* @const {RegExp}
*/
var CURSOR_POS_EXP = new RegExp(":([^,]+)?(,(.+)?)?");
var CURSOR_POS_EXP = new RegExp(":([^,:]+)?([,:](.+)?)?");

/**
* Current plugin
Expand Down
16 changes: 16 additions & 0 deletions test/spec/QuickOpen-integ-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,5 +182,21 @@ define(function (require, exports, module) {
it("can directly open a file in a given line and column, centering that line on the screen", async function () {
await quickOpenTest("lines:150,20", null, "lotsOfLines.html", 150, 20);
});

it("can open a file and jump to a line and column with no space after comma", async function () {
await quickOpenTest("lines", ":50,20", "lotsOfLines.html", 50, 20);
});

it("can open a file and jump to a line and column with space after comma", async function () {
await quickOpenTest("lines", ":50, 20", "lotsOfLines.html", 50, 20);
});

it("can directly open a file with line:column format", async function () {
await quickOpenTest("lines:150:20", null, "lotsOfLines.html", 150, 20);
});

it("can directly open a file with line:column format and spaces", async function () {
await quickOpenTest("lines:150: 20", null, "lotsOfLines.html", 150, 20);
});
});
});
Loading