cleanup
This commit is contained in:
@@ -92,8 +92,7 @@ IA_ void scatter(U4 token, const char* anno_str) {
|
|||||||
aptr[0] = 0;
|
aptr[0] = 0;
|
||||||
if (anno_str) {
|
if (anno_str) {
|
||||||
char* dest = (char*)aptr;
|
char* dest = (char*)aptr;
|
||||||
int i = 0;
|
int i = 0; while(i < 8 && anno_str[i]) {
|
||||||
while(i < 8 && anno_str[i]) {
|
|
||||||
dest[i] = anno_str[i];
|
dest[i] = anno_str[i];
|
||||||
i ++;
|
i ++;
|
||||||
}
|
}
|
||||||
@@ -403,7 +402,6 @@ S8 win_proc(void* hwnd, U4 msg, U8 wparam, S8 lparam)
|
|||||||
}
|
}
|
||||||
else return 0;
|
else return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tape_count > 0) {
|
if (tape_count > 0) {
|
||||||
U8*r anno_ptr = u8_r(anno_arena.start);
|
U8*r anno_ptr = u8_r(anno_arena.start);
|
||||||
for (U8 i = delete_idx; i < tape_count - 1; i ++) {
|
for (U8 i = delete_idx; i < tape_count - 1; i ++) {
|
||||||
@@ -413,7 +411,8 @@ S8 win_proc(void* hwnd, U4 msg, U8 wparam, S8 lparam)
|
|||||||
tape_arena.used -= sizeof(U4);
|
tape_arena.used -= sizeof(U4);
|
||||||
anno_arena.used -= sizeof(U8);
|
anno_arena.used -= sizeof(U8);
|
||||||
}
|
}
|
||||||
} else if (wparam == MS_VK_SPACE || wparam == MS_VK_RETURN) {
|
}
|
||||||
|
else if (wparam == MS_VK_SPACE || wparam == MS_VK_RETURN) {
|
||||||
// Insert New Token
|
// Insert New Token
|
||||||
// Shift: insert AFTER cursor | Regular: insert BEFORE cursor
|
// Shift: insert AFTER cursor | Regular: insert BEFORE cursor
|
||||||
B4 is_shift = (ms_get_async_key_state(MS_VK_SHIFT) & 0x8000) != 0;
|
B4 is_shift = (ms_get_async_key_state(MS_VK_SHIFT) & 0x8000) != 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user