Fixed bug in saving files: was missing os.O_TRUNC bit flag
This commit is contained in:
@@ -16,17 +16,6 @@ func TestRopeInserting(t *testing.T) {
|
||||
t.Errorf("string does not match \"withtext\", got %#v", str)
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
//withtext
|
||||
//
|
||||
|
||||
// Note the inclusive bounds and pointing to last line, first column.
|
||||
buf.Remove(0, 0, 1, 0) // Delete all of the buffer
|
||||
|
||||
if str := string(buf.Bytes()); str != "" {
|
||||
t.Errorf("string does not math \"\", got %#v", str)
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
func TestRopeBounds(t *testing.T) {
|
||||
|
@@ -113,7 +113,6 @@ func (t *TextEdit) Delete(forwards bool) {
|
||||
t.Dirty = true
|
||||
|
||||
if t.selectMode { // If text is selected, delete the whole selection
|
||||
t.cury, t.curx = t.Buffer.ClampLineCol(t.selection.EndLine, t.selection.EndCol)
|
||||
t.selectMode = false // Disable selection and prevent infinite loop
|
||||
|
||||
// Delete the region
|
||||
|
Reference in New Issue
Block a user