Fix append() without line argument

We want to switch include_start/end when the index is positive or
negative.
This commit is contained in:
Enrico Ghirardi 2015-09-20 12:37:42 +02:00
parent 2417aeebbf
commit 8ab09087da

View File

@ -467,7 +467,8 @@ void buffer_insert(Buffer buffer,
ArrayOf(String) lines,
Error *err)
{
buffer_set_line_slice(buffer, lnum, lnum, true, false, lines, err);
bool end_start = lnum < 0;
buffer_set_line_slice(buffer, lnum, lnum, !end_start, end_start, lines, err);
}
/// Return a tuple (row,col) representing the position of the named mark