refactor: explicity publish internal helix functions for unittests only
We don't want internal functions in the mode specific extention modules becoming shared code. To avoid this, mark the functions as private and publish only through a structure marked clearly as for testing only. If these functions are useful as shared code they can be moved to the editor module or else where.
This commit is contained in:
parent
a6f5ffcdc5
commit
c7b46856bb
2 changed files with 20 additions and 10 deletions
|
@ -12,22 +12,22 @@ fn apply_movements(movements: []const u8, root: Buffer.Root, cursor: *Cursor, th
|
|||
for (movements) |move| {
|
||||
switch (move) {
|
||||
'W' => {
|
||||
try helix.move_cursor_long_word_right(root, cursor, the_metrics);
|
||||
try helix.test_internal.move_cursor_long_word_right(root, cursor, the_metrics);
|
||||
},
|
||||
'B' => {
|
||||
try helix.move_cursor_long_word_left(root, cursor, the_metrics);
|
||||
try helix.test_internal.move_cursor_long_word_left(root, cursor, the_metrics);
|
||||
},
|
||||
'E' => {
|
||||
try helix.move_cursor_long_word_right_end(root, cursor, the_metrics);
|
||||
try helix.test_internal.move_cursor_long_word_right_end(root, cursor, the_metrics);
|
||||
},
|
||||
'w' => {
|
||||
try Editor.move_cursor_word_right_vim(root, cursor, the_metrics);
|
||||
},
|
||||
'b' => {
|
||||
try helix.move_cursor_word_left_helix(root, cursor, the_metrics);
|
||||
try helix.test_internal.move_cursor_word_left_helix(root, cursor, the_metrics);
|
||||
},
|
||||
'e' => {
|
||||
try helix.move_cursor_word_right_end_helix(root, cursor, the_metrics);
|
||||
try helix.test_internal.move_cursor_word_right_end_helix(root, cursor, the_metrics);
|
||||
},
|
||||
else => {},
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue