From 9fc4c33678e51c552ef8e3e395270393753f06ec Mon Sep 17 00:00:00 2001 From: Randy Edmunds Date: Wed, 5 Feb 2014 12:12:13 -0800 Subject: [PATCH 1/2] add missing param --- src/search/FindReplace.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search/FindReplace.js b/src/search/FindReplace.js index 8bb30a341bb..2b01b1bd513 100644 --- a/src/search/FindReplace.js +++ b/src/search/FindReplace.js @@ -168,7 +168,7 @@ define(function (require, exports, module) { var cm = editor._codeMirror; cm.operation(function () { var state = getSearchState(cm); - var cursor = getSearchCursor(cm, state.query, pos || editor.getCursorPos(Boolean(rev))); // null and false mean different things to getCursorPos() + var cursor = getSearchCursor(cm, state.query, pos || editor.getCursorPos(true, Boolean(rev))); // null and false mean different things to getCursorPos() state.lastMatch = cursor.find(rev); if (!state.lastMatch) { From 6c7e4e08b23dfaaa74fa54f670203b64a4f186de Mon Sep 17 00:00:00 2001 From: Randy Edmunds Date: Wed, 5 Feb 2014 13:27:08 -0800 Subject: [PATCH 2/2] don't expand tabs chars; clarify pos start --- src/search/FindReplace.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search/FindReplace.js b/src/search/FindReplace.js index 2b01b1bd513..a4d065dbb38 100644 --- a/src/search/FindReplace.js +++ b/src/search/FindReplace.js @@ -168,7 +168,7 @@ define(function (require, exports, module) { var cm = editor._codeMirror; cm.operation(function () { var state = getSearchState(cm); - var cursor = getSearchCursor(cm, state.query, pos || editor.getCursorPos(true, Boolean(rev))); // null and false mean different things to getCursorPos() + var cursor = getSearchCursor(cm, state.query, pos || editor.getCursorPos(false, rev ? "start" : "end")); state.lastMatch = cursor.find(rev); if (!state.lastMatch) {