Skip to content

Commit

Permalink
fix space width
Browse files Browse the repository at this point in the history
  • Loading branch information
nakagami committed Aug 25, 2024
1 parent 2b1af40 commit 80cb316
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pyvim/key_bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,11 @@ def tab_indent(event):
"""
b = event.app.current_buffer
if b.expand_tab:
b.insert_text(' ' * b.shiftwidth)
sw = b.shiftwidth
col_mod = b.document.cursor_position_col % b.shiftwidth
if col_mod:
sw -= col_mod
b.insert_text(' ' * sw)
else:
b.insert_text('\t')

Expand Down

0 comments on commit 80cb316

Please sign in to comment.