weechat / weechat

The extensible chat client.
https://weechat.org
GNU General Public License v3.0
2.97k stars 332 forks source link

pasting tabs converts them to spaces #804

Open izabera opened 8 years ago

izabera commented 8 years ago

when i paste code with tabs, weechat converts each tab to 1 space that's pretty annoying because it completely fucks up the indentation i tried setting weechat.look.tab_width to 8 but it doesn't seem to solve the issue i'm using weechat 1.5 as shipped on arch linux

flashcode commented 8 years ago

Hi,

Yes, currently all tabs are replaced by spaces, this is a "feature", not really a bug. This is done because in WeeChat the tab key is interpreted for completion, so keeping Tabs would do completion inside the pasted message.

It should be possible though to temporarily disable Tab completion during the paste (if the paste is properly detected by WeeChat, for example using paste bracketing), and enable it again at the end of paste, to keep Tabs.