mirror of
https://github.com/slint-ui/slint.git
synced 2025-11-01 20:31:27 +00:00
Interpreter: Include the id := in Elements
Include the "id :=" part when highlighting an Element. This places the cursor at the 'i' now. Done-with: @ogoffart
This commit is contained in:
parent
9448e98d8a
commit
43aae1de1c
2 changed files with 26 additions and 19 deletions
|
|
@ -42,6 +42,8 @@ pub trait SyntaxNodeVerify {
|
|||
}
|
||||
}
|
||||
|
||||
pub use rowan::TextRange;
|
||||
|
||||
/// Check that a node has the assumed children
|
||||
#[cfg(test)]
|
||||
macro_rules! verify_node {
|
||||
|
|
@ -844,7 +846,7 @@ impl NodeOrToken {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn text_range(&self) -> rowan::TextRange {
|
||||
pub fn text_range(&self) -> TextRange {
|
||||
match self {
|
||||
NodeOrToken::Node(n) => n.text_range(),
|
||||
NodeOrToken::Token(t) => t.text_range(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue