AmirF194
cb38f6f82a
fix(editing): delete last line of a file without a trailing newline
...
delete_lines/replace_lines address the position one line past the last line
(line == number of lines, col 0). get_index_from_line_col cannot resolve that
position when the file has no trailing newline (no closing newline to count),
so delete_text_between_positions raised InvalidTextLocationError and the delete
crashed on a very common file shape.
Clamp that past-EOF end position to end-of-file in delete_text_between_positions,
mirroring the guard insert_text_at_position already has. A file with no trailing
newline now deletes its last line identically to one with a trailing newline.
Adds TextUtils unit tests and a CHANGELOG entry.
2026-07-15 20:22:25 +02:00
..
2026-05-09 17:49:12 +02:00
2026-04-01 16:29:00 +02:00
2026-07-03 15:01:16 +02:00
2026-06-28 17:47:36 +02:00
2026-04-29 23:52:26 +02:00
2026-06-28 17:47:36 +02:00
2026-07-01 14:32:37 +02:00
2026-06-28 14:48:55 +02:00
2026-06-28 17:47:36 +02:00
2026-07-03 01:05:40 +02:00
2026-05-18 22:12:40 +02:00
2026-04-29 23:52:26 +02:00
2026-07-01 14:32:37 +02:00
2026-06-28 17:47:36 +02:00
2026-06-28 17:47:36 +02:00
2026-04-29 23:52:26 +02:00
2026-06-28 17:47:36 +02:00
2026-04-29 23:52:26 +02:00
2026-04-29 23:52:26 +02:00
2026-06-28 17:47:36 +02:00
2026-04-29 23:52:26 +02:00
2026-04-29 23:52:26 +02:00
2026-05-05 14:33:51 +02:00
2026-07-06 15:32:51 -06:00
2026-04-29 23:52:26 +02:00
2026-06-28 17:47:36 +02:00
2026-06-28 17:47:36 +02:00
2026-06-25 11:21:39 +02:00
2026-06-28 17:47:36 +02:00
2026-04-29 23:52:26 +02:00
2026-04-01 16:29:00 +02:00
2026-04-01 16:29:00 +02:00
2026-06-28 17:47:36 +02:00
2026-04-13 08:47:51 +02:00
2026-06-28 17:47:36 +02:00
2026-06-28 17:47:36 +02:00
2026-04-29 23:52:26 +02:00
2026-07-12 13:19:39 +02:00
2026-06-28 14:46:27 +02:00
2026-04-29 23:52:26 +02:00
2026-07-01 14:32:37 +02:00
2026-07-13 13:54:23 +02:00
2026-06-28 17:47:36 +02:00
2026-06-28 17:47:36 +02:00
2026-04-01 16:29:00 +02:00
2026-04-29 23:52:26 +02:00
2026-06-29 12:26:07 +02:00
2026-05-05 14:33:51 +02:00
2026-07-10 20:17:39 -04:00
2026-07-11 18:06:17 -04:00
2026-07-01 14:32:37 +02:00
2026-06-28 17:47:36 +02:00
2026-06-28 17:47:36 +02:00
2026-04-29 23:52:26 +02:00
2026-05-04 14:26:20 +02:00
2026-04-29 23:52:26 +02:00
2026-04-29 23:52:26 +02:00
2026-04-29 23:52:26 +02:00
2026-06-29 11:25:39 +02:00
2026-06-28 20:53:39 +08:00
2026-07-12 11:18:27 +02:00
2026-07-03 01:05:40 +02:00
2026-07-12 11:54:05 +02:00
2026-01-10 23:31:23 -05:00
2026-07-03 15:14:20 +02:00
2026-07-15 20:22:25 +02:00
2026-07-11 18:06:17 -04:00