| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
| |
The cost is just having to tweak a few more brittle tests. I can't
actually perceive any difference in how the cursor moves when I click on
text.
|
|
|
|
|
|
|
|
|
|
| |
I've been sloppy about this so far, and outside of tests I can't find
any examples where it matters, but it matters in a potential fork where
I'm rendering multiple columns of text.
It's unfortunate that my tests have this level of brittleness. What I'd
really like to assert in many of these changed lines is that the text
stays inside the margins and that more text would overflow margins.
|
| |
|
|
|
|
| |
I have no idea what the performance implications of this are..
|
| |
|
|
|
|
| |
- Text.screen_line_width
|
|
|
|
| |
- Text.compute_fragments
|
|
|
|
| |
- Text.screen_line_index
|
|
|
|
| |
- Text.to_pos_on_line
|
|
|
|
| |
- Text.populate_screen_line_starting_pos
|
|
|
|
| |
- Text.in_line
|
| |
|
| |
|
|
|
|
|
| |
It's starting to sink in that I don't want hard-coded constants inside
objects.
|
|
|
|
|
|
|
|
|
| |
- Drawing.draw_shape
- Drawing.draw_pending_shape
- Drawing.in_drawing
- Drawing.find_or_insert_point
- Drawing.near
- Drawing.pixels
|
| |
|
|
|
|
|
| |
Editor state initialization now depends on window dimensions, so we have
to more carefully orchestrate startup.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Text.cursor_at_final_screen_line
- Text.move_cursor_down_to_next_text_line_while_scrolling_again_if_necessary
- Text.snap_cursor_to_bottom_of_screen
- Text.in_line
- Text.to_pos_on_line
- Text.to2
- Text.to1
- Text.previous_screen_line
- Text.tweak_screen_top_and_cursor
- Text.redraw_all
|
|
|
|
|
| |
- Text.pos_at_start_of_cursor_screen_line
- Text.cursor_past_screen_bottom
|
|
|
|
|
|
| |
- Text.left
- Text.right
- Text.right_without_scroll
|
|
|
|
|
|
|
| |
- record_undo_event
- undo_event
- redo_event
- snapshot
|
|
|
|
|
|
|
|
|
|
|
| |
- Text.draw_highlight
- Text.clip_selection
- Text.selection
- Text.cut_selection
- Text.delete_selection
- Text.delete_selection_without_undo
- Text.mouse_pos
- Text.to_pos
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Text.insert_at_cursor
- Text.insert_return
- Text.pageup
- Text.pagedown
- Text.up
- Text.down
- Text.start_of_line
- Text.end_of_line
- Text.word_left
- Text.word_right
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
- Text.draw
- Text.draw_cursor
- Text.draw_search_bar
|
|
|
|
| |
We're still accessing them through a global. But we'll change that next.
|
| |
|
|
|
|
|
| |
One advantage of this approach: we don't end up with multiple lexical
scopes containing duplicates of the same modules.
|
| |
|
| |
|
|
|
|
|
|
|
| |
The final step is to add them to:
- Text.compute_fragments
Doing it carefully caught 5 call-sites that my tests didn't catch.
|
|
|
|
| |
- Text.populate_screen_line_starting_pos
|
|
|
|
| |
- Text.to2
|
|
|
|
| |
- Text.previous_screen_line
|
|
|
|
| |
- Text.snap_cursor_to_bottom_of_screen
|
|
|
|
| |
- Text.nearest_cursor_pos
|
|
|
|
| |
- Text.move_cursor_down_to_next_text_line_while_scrolling_again_if_necessary
|
|
|
|
| |
- Text.cursor_at_final_screen_line
|
|
|
|
| |
- Text.pos_at_start_of_cursor_screen_line
|
|
|
|
| |
- Text.to_pos_on_line
|
| |
|
|
|
|
| |
- Text.in_line
|
|
|
|
|
|
|
|
|
| |
- Text.clip_selection
- Text.cut_selection
- Text.delete_selection
- Text.delete_selection_without_undo
- Text.mouse_pos
- Text.to_pos
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Text.pageup
- Text.pagedown
- Text.up
- Text.down
- Text.end_of_line
- Text.word_left
- Text.word_right
- Text.left
- Text.right
|
|
|
|
|
|
|
|
|
|
|
| |
I have a set of changes that passes all tests, but I'm going to commit
them very carefully to ensure I don't miss any call-sites. In this
commit I'm adding the args to:
- Text.draw
- Text.tweak_screen_top_and_cursor
But calls within them don't yet pass them where they should. In this
manner I'm going to progress systematically from the top down.
|
| |
|
| |
|
| |
|