mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-11 07:02:44 +09:00
@@ -687,7 +687,7 @@ func (v *View) InsertTab(usePlugin bool) bool {
|
||||
// Insert a tab
|
||||
if v.Buf.Settings["tabstospaces"].(bool) {
|
||||
tabSize := int(v.Buf.Settings["tabsize"].(float64))
|
||||
if remainder := v.Cursor.Loc.X % tabSize; remainder != 0 {
|
||||
if remainder := v.Cursor.GetVisualX() % tabSize; remainder != 0 {
|
||||
tabSize = tabSize - remainder
|
||||
}
|
||||
v.Buf.Insert(v.Cursor.Loc, Spaces(tabSize))
|
||||
|
||||
Reference in New Issue
Block a user