mirror of
https://github.com/wez/wezterm.git
synced 2024-09-20 11:17:15 +03:00
gui: force cursor to be visible in copy mode
It appears as though kakoune hides the terminal cursor and renders its own version of the cursor. The hidden state was being picked up by the copymode overlay, making it awkward to use. This commit forces the cursor to be visible (and a block) when copy mode is active. closes: #1113
This commit is contained in:
parent
7da1971bad
commit
aa61a6b065
@ -35,6 +35,7 @@ As features stabilize some brief notes about them will accumulate here.
|
||||
* Fixed: X11: computed but did not use the correct DPI for HiDPI screens [#947](https://github.com/wez/wezterm/issues/947)
|
||||
* Improved: performance when resolving fallback fonts via fontconfig, and of coverage calculation with freetype. Thanks to [@H-M-H](https://github.com/H-M-H)!
|
||||
* Fixed: Wayland: incorrect initial surface size for HiDPI screens. Thanks to [@unrelentingtech](https://github.com/unrelentingtech)! [#1111](https://github.com/wez/wezterm/issues/1111) [#1112](https://github.com/wez/wezterm/pull/1112)
|
||||
* Fixed: invisible cursor in CopyMode when using kakoune [#1113](https://github.com/wez/wezterm/issues/1113)
|
||||
|
||||
### 20210814-124438-54e29167
|
||||
|
||||
|
@ -10,7 +10,7 @@ use std::cell::{RefCell, RefMut};
|
||||
use std::ops::Range;
|
||||
use std::rc::Rc;
|
||||
use std::sync::Arc;
|
||||
use termwiz::surface::SequenceNo;
|
||||
use termwiz::surface::{CursorVisibility, SequenceNo};
|
||||
use unicode_segmentation::*;
|
||||
use url::Url;
|
||||
use wezterm_term::color::ColorPalette;
|
||||
@ -43,6 +43,7 @@ impl CopyOverlay {
|
||||
pub fn with_pane(term_window: &TermWindow, pane: &Rc<dyn Pane>) -> Rc<dyn Pane> {
|
||||
let mut cursor = pane.get_cursor_position();
|
||||
cursor.shape = termwiz::surface::CursorShape::SteadyBlock;
|
||||
cursor.visibility = CursorVisibility::Visible;
|
||||
|
||||
let window = term_window.window.clone().unwrap();
|
||||
let render = CopyRenderable {
|
||||
@ -518,7 +519,7 @@ impl Pane for CopyOverlay {
|
||||
}
|
||||
|
||||
fn get_cursor_position(&self) -> StableCursorPosition {
|
||||
self.render.borrow_mut().cursor
|
||||
self.render.borrow().cursor
|
||||
}
|
||||
|
||||
fn get_current_seqno(&self) -> SequenceNo {
|
||||
|
Loading…
Reference in New Issue
Block a user