mirror of
https://github.com/slap-editor/slap.git
synced 2024-11-05 05:34:51 +03:00
Adds "search wrapped" message
This commit is contained in:
parent
9bfeb1d861
commit
935e7d6aab
@ -210,9 +210,9 @@ Slap.prototype._initHandlers = function () {
|
|||||||
} else {
|
} else {
|
||||||
pos = textUtil.find(self.editor.lines(), pattern);
|
pos = textUtil.find(self.editor.lines(), pattern);
|
||||||
if (pos) {
|
if (pos) {
|
||||||
if (Coordinate.linear.cmp(pos, self.editor.cursor()) === 0) {
|
self.message(Coordinate.linear.cmp(pos, self.editor.cursor()) !== 0
|
||||||
self.message("this is the only occurrence", 'info');
|
? "search wrapped"
|
||||||
}
|
: "this is the only occurrence", 'info');
|
||||||
self.editor.select(null, pos);
|
self.editor.select(null, pos);
|
||||||
} else {
|
} else {
|
||||||
self.message("no matches", 'warning');
|
self.message("no matches", 'warning');
|
||||||
|
Loading…
Reference in New Issue
Block a user