Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When pasting multiple lines of code, the first line indent is automatically removed. #7028

Closed
wudixiaotie opened this issue Aug 22, 2022 · 3 comments

Comments

@wudixiaotie
Copy link

Describe the problem:
Whenever I try to paste multiple lines of code into tabby, the line breaks and spaces before the first line of the code are automatically removed, causing me to adjust the indentation of the code every time before pasting the code, This situation has no similar problem in iterm2 and hyper or native macos terminal.

To Reproduce:
My python code with line indent like this:

    a = 1
    for i in range(3):
        print(a + i)

then copy it into tabby shows like this:

> ipython
Python 3.8.11 (default, Sep  1 2021, 12:33:46) 
Type 'copyright', 'credits' or 'license' for more information
IPython 8.3.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: a = 1
   ...:     for i in range(3):
   ...:         print(a + i)
  Input In [1]
    for i in range(3):
    ^
IndentationError: unexpected indent

I don't think it's a problem to remove the indentation and line breaks before the code when pasting a single line of code, but when pasting multiple lines, it is best to keep the indentation of all lines, or there is an option in the configuration, such as when pasting multiple lines. , whether to automatically remove first line indentation and line breaks

@wudixiaotie
Copy link
Author

wudixiaotie commented Oct 8, 2022

In MacOS Monterey 12.2.1, after I upgrade tabby to ver.1.0.184, the issue still exists. @Eugeny

@honghuzi
Copy link

In MacOS Monterey 12.2.1, after I upgrade tabby to ver.1.0.184, the issue still exists. @Eugeny

Still exists on Windows 10

@Eugeny Eugeny reopened this Oct 25, 2022
@Eugeny Eugeny closed this as completed in 270f273 Oct 25, 2022
@honghuzi
Copy link

solved on windows 10 for 1.0.185

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants