Fix hint querying bugs
This commit is contained in:
parent
debdc3603e
commit
58343563ba
1 changed files with 5 additions and 12 deletions
|
@ -2749,7 +2749,7 @@ impl Editor {
|
||||||
let buffer = self.buffer.read(cx).read(cx);
|
let buffer = self.buffer.read(cx).read(cx);
|
||||||
let new_inlays = to_insert
|
let new_inlays = to_insert
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|(id, hint_anchor, hint)| {
|
.map(|(id, position, hint)| {
|
||||||
let mut text = hint.text();
|
let mut text = hint.text();
|
||||||
// TODO kb styling instead?
|
// TODO kb styling instead?
|
||||||
if hint.padding_right {
|
if hint.padding_right {
|
||||||
|
@ -2758,14 +2758,7 @@ impl Editor {
|
||||||
if hint.padding_left {
|
if hint.padding_left {
|
||||||
text.insert(0, ' ');
|
text.insert(0, ' ');
|
||||||
}
|
}
|
||||||
|
(id, InlayProperties { position, text })
|
||||||
(
|
|
||||||
id,
|
|
||||||
InlayProperties {
|
|
||||||
position: hint_anchor.bias_left(&buffer),
|
|
||||||
text,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
drop(buffer);
|
drop(buffer);
|
||||||
|
@ -7355,7 +7348,7 @@ impl Editor {
|
||||||
}
|
}
|
||||||
multi_buffer::Event::DirtyChanged => {
|
multi_buffer::Event::DirtyChanged => {
|
||||||
cx.emit(Event::DirtyChanged);
|
cx.emit(Event::DirtyChanged);
|
||||||
true
|
false
|
||||||
}
|
}
|
||||||
multi_buffer::Event::Saved => {
|
multi_buffer::Event::Saved => {
|
||||||
cx.emit(Event::Saved);
|
cx.emit(Event::Saved);
|
||||||
|
@ -7363,11 +7356,11 @@ impl Editor {
|
||||||
}
|
}
|
||||||
multi_buffer::Event::FileHandleChanged => {
|
multi_buffer::Event::FileHandleChanged => {
|
||||||
cx.emit(Event::TitleChanged);
|
cx.emit(Event::TitleChanged);
|
||||||
true
|
false
|
||||||
}
|
}
|
||||||
multi_buffer::Event::Reloaded => {
|
multi_buffer::Event::Reloaded => {
|
||||||
cx.emit(Event::TitleChanged);
|
cx.emit(Event::TitleChanged);
|
||||||
true
|
false
|
||||||
}
|
}
|
||||||
multi_buffer::Event::DiffBaseChanged => {
|
multi_buffer::Event::DiffBaseChanged => {
|
||||||
cx.emit(Event::DiffBaseChanged);
|
cx.emit(Event::DiffBaseChanged);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue