fixing cursor colunm

pull/11164/head
Théo Daron 2 months ago
parent 385ea7c07e
commit 755c51fb6d

@ -1,3 +1,5 @@
use helix_core::coords_at_pos;
use crate::Editor;
use std::borrow::Cow;
@ -93,11 +95,13 @@ impl Editor {
.cursor_line(doc.text().slice(..))
+ 1)
.to_string(),
"cursorcolumn" => (doc
.selection(view.id)
"cursorcolumn" => (coords_at_pos(
doc.text().slice(..),
doc.selection(view.id)
.primary()
.cursor(doc.text().slice(..))
+ 1)
.cursor(doc.text().slice(..)),
)
.col + 1)
.to_string(),
"lang" => doc.language_name().unwrap_or("text").to_string(),
"ext" => doc

Loading…
Cancel
Save