Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only show cross-hairs when terminal has focus #1772

Merged
merged 4 commits into from
Nov 26, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1154,9 +1154,9 @@ export class Terminal extends EventEmitter implements ITerminal, IDisposable, II
*/
public updateCursorStyle(ev: KeyboardEvent): void {
if (this.selectionManager && this.selectionManager.shouldColumnSelect(ev)) {
this.element.classList.add('xterm-cursor-crosshair');
this.element.classList.add('column-select');
} else {
this.element.classList.remove('xterm-cursor-crosshair');
this.element.classList.remove('column-select');
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/xterm.css
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
cursor: pointer;
}

.xterm.xterm-cursor-crosshair {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xterm-cursor-crosshair aligns with the naming of xterm-cursor-pointer, not sure we want to change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The current alignment of the names re-enforces the false impression that the two are strongly correlated, and is part of why the name should change. At some point xterm-cursor-pointer should be replaced with something more semantic as well (maybe something like linkified).

.xterm.column-select.focus {
/* Column selection mode */
cursor: crosshair;
}
Expand Down