diff options
| author | Ayose <ayosec@gmail.com> | 2021-04-01 20:16:04 +0100 |
|---|---|---|
| committer | Ayose <ayosec@gmail.com> | 2021-04-01 20:16:04 +0100 |
| commit | b4adf34bb9ce6e28fa0c15ab8b9eaea20303e982 (patch) | |
| tree | 257086569277a6f2265dc797bed6fa1140240235 | |
| parent | 08ceb315108895390792459943fef4069124494f (diff) | |
| parent | 58cae8f2edf44e6bf0721543c61edb57bdf7d776 (diff) | |
| download | r-alacritty-b4adf34bb9ce6e28fa0c15ab8b9eaea20303e982.tar.gz r-alacritty-b4adf34bb9ce6e28fa0c15ab8b9eaea20303e982.tar.bz2 r-alacritty-b4adf34bb9ce6e28fa0c15ab8b9eaea20303e982.zip | |
Merge remote-tracking branch 'vendor/master' into tmp1
113 files changed, 1523 insertions, 1972 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 59478697..74391ed8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). - Alacritty failing to start on X11 with invalid DPI reported by XRandr - Text selected after search without any match - Incorrect vi cursor position after leaving search +- Clicking on URLs on Windows incorrectly opens File Explorer +- Incorrect underline cursor thickness on wide cell +- Viewport moving around when resizing while scrolled into history ### Removed diff --git a/alacritty.yml b/alacritty.yml index 2ffadc2d..d049e665 100644 --- a/alacritty.yml +++ b/alacritty.yml @@ -456,7 +456,7 @@ # Default: # - (macOS) open # - (Linux/BSD) xdg-open - # - (Windows) explorer + # - (Windows) cmd /c start "" #launcher: # program: xdg-open # args: [] diff --git a/alacritty/src/config/mouse.rs b/alacritty/src/config/mouse.rs index f562ebe0..2aa7557c 100644 --- a/alacritty/src/config/mouse.rs +++ b/alacritty/src/config/mouse.rs @@ -38,7 +38,10 @@ impl Default for Url { #[cfg(target_os = "macos")] launcher: Some(Program::Just(String::from("open"))), #[cfg(windows)] - launcher: Some(Program::Just(String::from("explorer"))), + launcher: Some(Program::WithArgs { + program: String::from("cmd"), + args: vec!["/c".to_string(), "start".to_string(), "".to_string()], + }), modifiers: Default::default(), } } diff --git a/alacritty/src/config/window.rs b/alacritty/src/config/window.rs index 2d501b91..d74390d8 100644 --- a/alacritty/src/config/window.rs +++ b/alacritty/src/config/window.rs @@ -8,7 +8,7 @@ use serde::{Deserialize, Deserializer}; use alacritty_config_derive::ConfigDeserialize; use alacritty_terminal::config::LOG_TARGET_CONFIG; -use alacritty_terminal::index::{Column, Line}; +use alacritty_terminal::index::Column; use crate::config::ui_config::Delta; @@ -74,7 +74,7 @@ impl WindowConfig { #[inline] pub fn dimensions(&self) -> Option<Dimensions> { if self.dimensions.columns.0 != 0 - && self.dimensions.lines.0 != 0 + && self.dimensions.lines != 0 && self.startup_mode != StartupMode::Maximized { Some(self.dimensions) @@ -145,7 +145,7 @@ pub struct Dimensions { pub columns: Column, /// Window Height in character lines. - pub lines: Line, + pub lines: usize, } /// Window class hint. diff --git a/alacritty/src/display/content.rs b/alacritty/src/display/content.rs index aa63836c..2a638a41 100644 --- a/alacritty/src/display/content.rs +++ b/alacritty/src/display/content.rs @@ -1,5 +1,5 @@ use std::borrow::Cow; -use std::cmp::max; +use std::cmp::{max, min}; use std::mem; use std::ops::{Deref, DerefMut, RangeInclusive}; @@ -127,12 +127,17 @@ impl<'a> RenderableContent<'a> { let text_color = text_color.color(cell.fg, cell.bg); let cursor_color = cursor_color.color(cell.fg, cell.bg); + // Convert cursor point to viewport position. + let cursor_point = self.terminal_cursor.point; + let line = (cursor_point.line + self.terminal_content.display_offset as i32).0 as usize; + let point = Point::new(line, cursor_point.column); + Some(RenderableCursor { - point: self.terminal_cursor.point, shape: self.terminal_cursor.shape, cursor_color, text_color, is_wide, + point, }) } } @@ -148,9 +153,10 @@ impl<'a> Iterator for RenderableContent<'a> { fn next(&mut self) -> Option<Self::Item> { |