mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 14:47:16 +09:00
buffer: Rework to retain support of combined characters
This commit is contained in:
@@ -249,7 +249,7 @@ func (b *Buffer) saveToFile(filename string, withSudo bool, autoSave bool) error
|
||||
|
||||
if !autoSave && b.Settings["rmtrailingws"].(bool) {
|
||||
for i, l := range b.lines {
|
||||
leftover := strings.TrimRightFunc(string(l.runes), unicode.IsSpace)
|
||||
leftover := strings.TrimRightFunc(l.String(), unicode.IsSpace)
|
||||
linelen := len(l.runes)
|
||||
b.Remove(Loc{len(leftover), i}, Loc{linelen, i})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user