3
如果窗口失去焦點,是否可以隱藏光標?例如'windmove-left將焦點移動到一個窗口左側,但仍然可以在不再活動的窗口中看到光標。如果窗口失去焦點,隱藏光標?
如果窗口失去焦點,是否可以隱藏光標?例如'windmove-left將焦點移動到一個窗口左側,但仍然可以在不再活動的窗口中看到光標。如果窗口失去焦點,隱藏光標?
這就是用戶選項的目的cursor-in-non-selected-windows
。
cursor-in-non-selected-windows is a variable defined in ‘C source code’.
Its value is t
Automatically becomes buffer-local when set.
Documentation:
Non-nil means show a cursor in non-selected windows.
If nil, only shows a cursor in the selected window.
If t, displays a cursor related to the usual cursor type
(a solid box becomes hollow, a bar becomes a narrower bar).
You can also specify the cursor type as in the `cursor-type' variable.
Use Custom to set this variable and update the display.
You can customize this variable.
以下調用爲我工作:(setq默認光標在-爲非選擇窗口無) – rogergl
正是 - 這就是你需要做的事。 – Drew