aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.md1
-rw-r--r--alacritty/src/event.rs10
2 files changed, 8 insertions, 3 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 20df64f0..38584ca5 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -37,6 +37,7 @@ Notable changes to the `alacritty_terminal` crate are documented in its
- Kitty keyboard protocol reporting shifted key codes
- Broken search with words broken across line boundary on the first character
- Config import changes not being live reloaded
+- Cursor color requests with default cursor colors
## 0.13.2
diff --git a/alacritty/src/event.rs b/alacritty/src/event.rs
index 72009d88..f10346af 100644
--- a/alacritty/src/event.rs
+++ b/alacritty/src/event.rs
@@ -34,6 +34,7 @@ use alacritty_terminal::index::{Boundary, Column, Direction, Line, Point, Side};
use alacritty_terminal::selection::{Selection, SelectionType};
use alacritty_terminal::term::search::{Match, RegexSearch};
use alacritty_terminal::term::{self, ClipboardType, Term, TermMode};
+use alacritty_terminal::vte::ansi::NamedColor;
#[cfg(unix)]
use crate::cli::{IpcConfig, ParsedOptions};
@@ -1737,9 +1738,12 @@ impl input::Processor<EventProxy, ActionContext<'_, Notifier, EventProxy>> {
}
},
TerminalEvent::ColorRequest(index, format) => {
- let color = self.ctx.terminal().colors()[index]
- .map(Rgb)
- .unwrap_or(self.ctx.display.colors[index]);
+ let color = match self.ctx.terminal().colors()[index] {
+ Some(color) => Rgb(color),
+ // Ignore cursor color requests unless it was changed.
+ None if index == NamedColor::Cursor as usize => return,
+ None => self.ctx.display.colors[index],
+ };
self.ctx.write_to_pty(format(color.0).into_bytes());
},
TerminalEvent::TextAreaSizeRequest(format) => {