Find Bug

已查看 29 次
跳至第一个未读帖子

arun...@googlemail.com

未读,
2021年7月28日 19:46:522021/7/28
收件人 Ajax.org Cloud9 Editor (Ace)
Hello,

I want to search a string in given range using backward (from bottom to top). 
I realize that when editor is not focused then it work fine and find string in given range but as soon as editor is focused, it start finding string from cursor position to bottom.
I am not sure if it's a bug or am not using options correctly.

Please see the options i am using...

var findOptions = {
backwards: true,
wrap: false,
caseSensitive: true,
wholeWord: true,
regExp: true,
range: {start: {row: 0, column: 0}, end: {row: 10, column: 0}},
skipCurrent: false,
preventScroll: true
};

var rangeObj = editor.find("searchString", findOptions);

Harutyun Amirjanyan

未读,
2021年7月29日 05:55:592021/7/29
收件人 ace-d...@googlegroups.com
if `start: {row: 10, column: 0},` is not present in options editor uses cursor position as start https://github.com/ajaxorg/ace/blob/563113e1900f691d0d669f64abe238d45796bcb0/lib/ace/editor.js#L2687

arun...@googlemail.com

未读,
2021年7月29日 07:01:372021/7/29
收件人 Ajax.org Cloud9 Editor (Ace)
It work..
added => findOptions.start = range.end;

Thanks :)
回复全部
回复作者
转发
0 个新帖子