Compare commits
2 Commits
ce06ca8057
...
38839408b1
| Author | SHA1 | Date | |
|---|---|---|---|
|
38839408b1
|
|||
|
d5f5dd21b0
|
@@ -6,6 +6,10 @@ A TUI IDE.
|
|||||||
|
|
||||||
# TODO
|
# TODO
|
||||||
|
|
||||||
|
- [ ] Fix problem highlighting selection when line is empty.
|
||||||
|
- [ ] Add ui api for setting cursor types.
|
||||||
|
- [ ] Use that api to set cursor for selection/insertion/normal etc properly.
|
||||||
|
- Sorta unrelated but check kutuwm + kitty problem not keeping cursor mode properly.
|
||||||
- [ ] Add line numbers.
|
- [ ] Add line numbers.
|
||||||
- [ ] Add bg highlight for current line.
|
- [ ] Add bg highlight for current line.
|
||||||
- [ ] Make function to get selected text. (selection itself is done)
|
- [ ] Make function to get selected text. (selection itself is done)
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ void render_editor(Editor *editor) {
|
|||||||
cursor.col = editor->position.col + col;
|
cursor.col = editor->position.col + col;
|
||||||
}
|
}
|
||||||
if (editor->selection_active &&
|
if (editor->selection_active &&
|
||||||
global_byte_offset + line_len + 1 >= sel_start &&
|
global_byte_offset + line_len + 1 > sel_start &&
|
||||||
global_byte_offset + line_len + 1 <= sel_end &&
|
global_byte_offset + line_len + 1 <= sel_end &&
|
||||||
col < editor->size.col) {
|
col < editor->size.col) {
|
||||||
update(editor->position.row + rendered_rows, editor->position.col + col,
|
update(editor->position.row + rendered_rows, editor->position.col + col,
|
||||||
@@ -350,7 +350,7 @@ void render_editor(Editor *editor) {
|
|||||||
}
|
}
|
||||||
uint32_t col = 0;
|
uint32_t col = 0;
|
||||||
if (editor->selection_active &&
|
if (editor->selection_active &&
|
||||||
global_byte_offset + line_len + 1 >= sel_start &&
|
global_byte_offset + line_len + 1 > sel_start &&
|
||||||
global_byte_offset + line_len + 1 <= sel_end) {
|
global_byte_offset + line_len + 1 <= sel_end) {
|
||||||
update(editor->position.row + rendered_rows, editor->position.col + col,
|
update(editor->position.row + rendered_rows, editor->position.col + col,
|
||||||
" ", 0, 0x555555, 0);
|
" ", 0, 0x555555, 0);
|
||||||
|
|||||||
@@ -152,7 +152,8 @@ int main(int argc, char *argv[]) {
|
|||||||
std::this_thread::sleep_for(std::chrono::milliseconds(8));
|
std::this_thread::sleep_for(std::chrono::milliseconds(8));
|
||||||
}
|
}
|
||||||
|
|
||||||
input_thread.detach();
|
if (input_thread.joinable())
|
||||||
|
input_thread.join();
|
||||||
|
|
||||||
if (work_thread.joinable())
|
if (work_thread.joinable())
|
||||||
work_thread.join();
|
work_thread.join();
|
||||||
|
|||||||
Reference in New Issue
Block a user