Merge branch 'refs/heads/char_encode'
# Conflicts: # include/builtins.h # include/data.h # include/editor_op.h # include/file_io.h # include/input.h # include/row_op.h # install.sh # main.c # meson.build # src/builtins.c # src/editor_op.c # src/file_io.c # src/init.c # src/input.c # src/output.c # src/row_op.c
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "../include/editor_op.h"
|
||||
#include "../include/row_op.h"
|
||||
#include "include/buffer.h"
|
||||
@@ -62,21 +60,3 @@ void bufferInsertNewLine() {
|
||||
fprintf(stderr, "Insert new line done\n");
|
||||
}
|
||||
|
||||
void bufferDelChar() {
|
||||
frow *row;
|
||||
EditorPane *active = splitScreenGetActivePane();
|
||||
struct buffer_t *buf = bufferFindById(active->buffer_id);
|
||||
if (active->cursor_y == buf->numrows || !(active->cursor_x || active->cursor_y)) {
|
||||
return;
|
||||
}
|
||||
row = &buf->row[active->cursor_y];
|
||||
if (active->cursor_x > 0) {
|
||||
bufferRowDelchar(buf, row, active->cursor_x - 1);
|
||||
--active->cursor_x;
|
||||
} else {
|
||||
active->cursor_x = buf->row[active->cursor_y - 1].size;
|
||||
bufferRowAppendString(buf, &buf->row[active->cursor_y - 1], row->chars, row->size);
|
||||
bufferDelRow(buf, active->cursor_y);
|
||||
--active->cursor_y;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user