This commit is contained in:
+4
-2
@@ -77,8 +77,10 @@ void bufferRowInsertBytes(struct buffer_t *buffer, row_t *row, int at,
|
||||
* \param at Index of the char to delete
|
||||
* \param row Row on operation is made */
|
||||
void bufferRowDelByte(struct buffer_t *buffer, row_t *row, int at, int n) {
|
||||
if (at < 0 || at >= row->size)
|
||||
return;
|
||||
if (buffer->state == READ_ONLY)
|
||||
return;
|
||||
if (at < 0 || at >= row->size)
|
||||
return;
|
||||
memmove(row->chars + at, row->chars + at + n, row->size - at - n);
|
||||
row->size -= n;
|
||||
row->chars[row->size] = '\0';
|
||||
|
||||
Reference in New Issue
Block a user