Made code fold indicators show up on active line indicators
This commit is contained in:
parent
41d3c5287b
commit
dc11d2726e
2 changed files with 6 additions and 1 deletions
|
@ -2702,6 +2702,7 @@ impl Editor {
|
||||||
pub fn render_fold_indicators(
|
pub fn render_fold_indicators(
|
||||||
&self,
|
&self,
|
||||||
fold_data: Option<Vec<(u32, FoldStatus)>>,
|
fold_data: Option<Vec<(u32, FoldStatus)>>,
|
||||||
|
active_rows: &BTreeMap<u32, bool>,
|
||||||
style: &EditorStyle,
|
style: &EditorStyle,
|
||||||
gutter_hovered: bool,
|
gutter_hovered: bool,
|
||||||
line_height: f32,
|
line_height: f32,
|
||||||
|
@ -2717,7 +2718,10 @@ impl Editor {
|
||||||
.iter()
|
.iter()
|
||||||
.copied()
|
.copied()
|
||||||
.filter_map(|(fold_location, fold_status)| {
|
.filter_map(|(fold_location, fold_status)| {
|
||||||
(gutter_hovered || fold_status == FoldStatus::Folded).then(|| {
|
(gutter_hovered
|
||||||
|
|| fold_status == FoldStatus::Folded
|
||||||
|
|| !*active_rows.get(&fold_location).unwrap_or(&true))
|
||||||
|
.then(|| {
|
||||||
(
|
(
|
||||||
fold_location,
|
fold_location,
|
||||||
MouseEventHandler::<FoldIndicators>::new(
|
MouseEventHandler::<FoldIndicators>::new(
|
||||||
|
|
|
@ -1858,6 +1858,7 @@ impl Element for EditorElement {
|
||||||
|
|
||||||
view.render_fold_indicators(
|
view.render_fold_indicators(
|
||||||
folds,
|
folds,
|
||||||
|
&active_rows,
|
||||||
&style,
|
&style,
|
||||||
view.gutter_hovered,
|
view.gutter_hovered,
|
||||||
line_height,
|
line_height,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue