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