Fix typo + Cleanup logic

This commit is contained in:
Bruno Ribeito
2017-11-12 23:15:09 +00:00
parent 18b86a1cbc
commit 6822070222
3 changed files with 2 additions and 2 deletions
-1
View File
@@ -195,7 +195,6 @@ export interface ISelectionManager {
selectionText: string;
selectionStart: [number, number];
selectionEnd: [number, number];
hasSelection: boolean;
disable(): void;
enable(): void;
+1
View File
@@ -280,6 +280,7 @@ export class SelectionManager extends EventEmitter implements ISelectionManager
this.refresh(true);
}
}
}
/**
* Selects all text within the terminal.
+1 -1
View File
@@ -108,7 +108,7 @@ export function moveTextAreaUnderMouseCursor(ev: MouseEvent, textarea: HTMLTextA
export function rightClickHandler(ev: MouseEvent, textarea: HTMLTextAreaElement, selectionManager: ISelectionManager, shouldSelectWord: boolean): void {
moveTextAreaUnderMouseCursor(ev, textarea);
if (shouldSelectWord && (!selectionManager.hasSelection || !selectionManager.isClickInSelection(ev)))
if (shouldSelectWord && !selectionManager.isClickInSelection(ev))
selectionManager.selectWordAtCursor(ev);
// Get textarea ready to copy from the context menu