You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
with setlocal smartpaste on micro formats it like this:
// (paste happens at the same indent level as this comment)// if you selected the leading whitespace on the first line:if (1) {
printf("Hello world\n");
}
// and if you didn't select the leading whitespace on the first line:if (1) {
printf("Hello world\n");
}
Note that the problem only happens when cursor is not at X=0 (no indent).
Asciinema demonstration
Current behavior on the left pane, my attempt at fixing some of it on the right: https://asciinema.org/a/617870 (problems start at 00:30) The version used on the recording is not the latest but I checked that the behavior hasn't changed since 2.0.12
test file used on the recording
deff():
ifx:
print(" hello")
# Happy cases:# 1) Paste block with no indent when cursor.X > 0# 2) Paste indented block when cursor.X = 0# 3) Single line with leading spacesdeff() {
ifx {
ABC
}
}
# Problematic cases:# 1) Paste indented block when cursor.X > 0# 2) Non-matching indentation# 3) Paste decreasing indentation when cursor.X > 0# Unsolvable(?) edge cases:# 1) paste poorly selected (no indent on first line) when cursor.X = 0# 2) paste poorly selected (no indent on first line) when cursor.X > 0
Version info
Commit hash: d8e9d61
OS: Linux (OpenSUSE Tumbleweed)
Terminal: terminator
The text was updated successfully, but these errors were encountered:
Description of the problem or steps to reproduce
When pasting indented code block such as
with
setlocal smartpaste on
micro formats it like this:Note that the problem only happens when cursor is not at X=0 (no indent).
Asciinema demonstration
Current behavior on the left pane, my attempt at fixing some of it on the right:
https://asciinema.org/a/617870 (problems start at 00:30)
The version used on the recording is not the latest but I checked that the behavior hasn't changed since 2.0.12
test file used on the recording
Version info
Commit hash: d8e9d61
OS: Linux (OpenSUSE Tumbleweed)
Terminal: terminator
The text was updated successfully, but these errors were encountered: