-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Dynamically resize line number gutter width #3469
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
Changes from all commits
d028319
db95cc6
c626995
969bba8
44cbc64
603913d
4015e38
9141852
57a9d56
82ce191
8674888
fd1bf47
f9152ba
07832d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -499,7 +499,7 @@ impl Tree { | |
// in a vertical container (and already correct based on previous search) | ||
child_id = *container.children.iter().min_by_key(|id| { | ||
let x = match &self.nodes[**id].content { | ||
Content::View(view) => view.inner_area().left(), | ||
Content::View(view) => view.area.left(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the only place where the Document isn't easily available to calculate the inner area (now that the gutter width is based on the Document contents). A simple solution is to use the entire view area instead. I think this would affect things like moving to a split when the screen location that you would move to would be in the gutter of a neighboring split. Previously, if you were to try to find a neighboring split at a gutter, you would get the window to the left, now you would get the window that contains the gutter. |
||
Content::Container(container) => container.area.left(), | ||
}; | ||
(current_x as i16 - x as i16).abs() | ||
|
@@ -510,7 +510,7 @@ impl Tree { | |
// in a horizontal container (and already correct based on previous search) | ||
child_id = *container.children.iter().min_by_key(|id| { | ||
let y = match &self.nodes[**id].content { | ||
Content::View(view) => view.inner_area().top(), | ||
Content::View(view) => view.area.top(), | ||
Content::Container(container) => container.area.top(), | ||
}; | ||
(current_y as i16 - y as i16).abs() | ||
|
Uh oh!
There was an error while loading. Please reload this page.