summaryrefslogtreecommitdiff
path: root/helix-term/src/ui
diff options
context:
space:
mode:
authorBlaž Hrastnik2021-03-16 06:30:29 +0000
committerBlaž Hrastnik2021-03-16 06:41:42 +0000
commit143cfe13e05b17840a9f2c69417ed98bc3b8cb0e (patch)
tree45cdea8a84a51a1cbf53daf55e5d9415d840762b /helix-term/src/ui
parent4f77d80e74b1406b8701f5569b3bec8da2e5ed03 (diff)
minor: TODO comment cleanup
Diffstat (limited to 'helix-term/src/ui')
-rw-r--r--helix-term/src/ui/editor.rs10
1 files changed, 3 insertions, 7 deletions
diff --git a/helix-term/src/ui/editor.rs b/helix-term/src/ui/editor.rs
index 31a19649..eb951a26 100644
--- a/helix-term/src/ui/editor.rs
+++ b/helix-term/src/ui/editor.rs
@@ -124,6 +124,9 @@ impl EditorView {
use helix_core::graphemes::{grapheme_width, RopeGraphemes};
+ // TODO: scope matching: biggest union match? [string] & [html, string], [string, html] & [ string, html]
+ // can do this by sorting our theme matches based on array len (longest first) then stopping at the
+ // first rule that matches (rule.all(|scope| scopes.contains(scope)))
let style = match spans.first() {
Some(span) => theme.get(theme.scopes()[span.0].as_str()),
None => Style::default().fg(Color::Rgb(164, 160, 232)), // lavender
@@ -138,8 +141,6 @@ impl EditorView {
// iterate over range char by char
for grapheme in RopeGraphemes::new(text) {
- // TODO: track current char_index
-
if grapheme == "\n" {
visual_x = 0;
line += 1;
@@ -433,9 +434,7 @@ impl Component for EditorView {
Event::Key(event) => {
let view = cx.editor.view_mut();
- // TODO: sequences (`gg`)
let mode = view.doc.mode();
- // TODO: handle count other than 1
let mut cxt = commands::Context {
executor: cx.executor,
editor: &mut cx.editor,
@@ -479,8 +478,6 @@ impl Component for EditorView {
if let Some(command) = self.keymap[&mode].get(&event) {
command(&mut cxt);
-
- // TODO: simplistic ensure cursor in view for now
}
}
}
@@ -503,7 +500,6 @@ impl Component for EditorView {
fn render(&self, mut area: Rect, surface: &mut Surface, cx: &mut Context) {
for (view, is_focused) in cx.editor.tree.views() {
- // TODO: use parent area
self.render_view(view, view.area, surface, &cx.editor.theme, is_focused);
}
}