mirror of
https://github.com/Hopiu/micro.git
synced 2026-03-31 05:10:26 +00:00
parent
38bf8c0225
commit
8f5f8ffdd6
1 changed files with 1 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue