提交 fb895768 编写于 作者: K Kai Wood

Enable "Find in selection" within single lines

Fixes (or implements? ;) ) Microsoft/issues#15125
上级 be33bcdb
......@@ -276,14 +276,14 @@ export class FindWidget extends Widget implements IOverlayWidget {
/**
* If 'selection find' is ON we should not disable the button (its function is to cancel 'selection find').
* If 'selection find' is OFF we enable the button only if there is a multi line selection.
* If 'selection find' is OFF we enable the button only if there is a selection.
*/
private _updateToggleSelectionFindButton(): void {
let selection = this._codeEditor.getSelection();
let isMultiLineSelection = selection ? (selection.startLineNumber !== selection.endLineNumber) : false;
let isSelection = selection ? (selection.startLineNumber !== selection.endLineNumber || selection.startColumn !== selection.endColumn) : false;
let isChecked = this._toggleSelectionFind.checked;
this._toggleSelectionFind.setEnabled(this._isVisible && (isChecked || isMultiLineSelection));
this._toggleSelectionFind.setEnabled(this._isVisible && (isChecked || isSelection));
}
private _updateButtons(): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册