@@ -52,7 +52,6 @@ impl Editor {
5252 size,
5353 surface: Surface::empty(area),
5454 cache: Surface::empty(area),
55− // TODO; move to state
5655 };
5756
5857 if let Some(file) = args.values_of_t::<PathBuf>("files").unwrap().pop() {
@@ -225,15 +224,7 @@ impl Editor {
225224 // lavender
226225 }
227226
228− // let lines = state
229− // .doc
230− // .lines_at(self.first_line as usize)
231− // .take(self.size.1 as usize)
232− // .map(|x| x.as_str().unwrap());
233−
234227 // // iterate over selections and render them
235− // let select = Style::default().bg(tui::style::Color::LightBlue);
236− // let text = state.doc.slice(..);
237228 // for range in state.selection.ranges() {
238229 // // get terminal coords for x,y for each range pos
239230 // // TODO: this won't work with multiline
@@ -246,8 +237,6 @@ impl Editor {
246237 // (y2 - y1 + 1) as u16,
247238 // );
248239 // self.surface.set_style(area, select);
249−
250− // // TODO: don't highlight next char in append mode
251240 // }
252241
253242 // statusline
@@ -330,13 +319,13 @@ impl Editor {
330319 }
331320
332321 Some(Ok(Event::Key(event))) => {
322+ // TODO: sequences (`gg`)
323+ // TODO: handle count other than 1
333324 if let Some(view) = &mut self.view {
334325 match view.state.mode() {
335326 Mode::Insert => {
336− // TODO: handle modes and sequences (`gg`)
337327 let keys = vec![event];
338328 if let Some(command) = keymap[&Mode::Insert].get(&keys) {
339− // TODO: handle count other than 1
340329 command(view, 1);
341330 } else if let KeyEvent {
342331 code: KeyCode::Char(c),
@@ -350,10 +339,8 @@ impl Editor {
350339 self.render();
351340 }
352341 Mode::Normal => {
353− // TODO: handle modes and sequences (`gg`)
354342 let keys = vec![event];
355343 if let Some(command) = keymap[&Mode::Normal].get(&keys) {
356− // TODO: handle count other than 1
357344 command(view, 1);
358345
359346 // TODO: simplistic ensure cursor in view for now