Mercurial > vim
comparison src/term.c @ 20065:fcfad3f4bc66 v8.2.0588
patch 8.2.0588: Putty does not use "sgr" 'ttymouse' by default
Commit: https://github.com/vim/vim/commit/314ca7cbb4b5a26959abb641a5aa265bee47abe5
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Apr 17 16:40:31 2020 +0200
patch 8.2.0588: Putty does not use "sgr" 'ttymouse' by default
Problem: Putty does not use "sgr" 'ttymouse' by default.
Solution: Make "sgr" the default for Putty. (Christian Brabandt,
closes #5942)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 17 Apr 2020 16:45:04 +0200 |
parents | 3d1de9093c01 |
children | 0ab9d7469ce7 |
comparison
equal
deleted
inserted
replaced
20064:6032e7206ddc | 20065:fcfad3f4bc66 |
---|---|
4760 || is_mac_terminal | 4760 || is_mac_terminal |
4761 || is_mintty | 4761 || is_mintty |
4762 || (is_screen && arg[1] >= 40700)) | 4762 || (is_screen && arg[1] >= 40700)) |
4763 set_option_value((char_u *)"ttym", 0L, | 4763 set_option_value((char_u *)"ttym", 0L, |
4764 (char_u *)"sgr", 0); | 4764 (char_u *)"sgr", 0); |
4765 // if xterm version >= 95 use mouse dragging | 4765 // For xterm version >= 95 mouse dragging works. |
4766 else if (version >= 95) | 4766 else if (version >= 95) |
4767 set_option_value((char_u *)"ttym", 0L, | 4767 set_option_value((char_u *)"ttym", 0L, |
4768 (char_u *)"xterm2", 0); | 4768 (char_u *)"xterm2", 0); |
4769 } | 4769 } |
4770 | 4770 |
4771 // Detect terminals that set $TERM to something like | 4771 // Detect terminals that set $TERM to something like |
4772 // "xterm-256colors" but are not fully xterm | 4772 // "xterm-256color" but are not fully xterm compatible. |
4773 // compatible. | |
4774 | 4773 |
4775 // Gnome terminal sends 1;3801;0, 1;4402;0 or 1;2501;0. | 4774 // Gnome terminal sends 1;3801;0, 1;4402;0 or 1;2501;0. |
4776 // xfce4-terminal sends 1;2802;0. | 4775 // xfce4-terminal sends 1;2802;0. |
4777 // screen sends 83;40500;0 | 4776 // screen sends 83;40500;0 |
4778 // Assuming any version number over 2500 is not an | 4777 // Assuming any version number over 2500 is not an |
4781 is_not_xterm = TRUE; | 4780 is_not_xterm = TRUE; |
4782 | 4781 |
4783 // PuTTY sends 0;136;0 | 4782 // PuTTY sends 0;136;0 |
4784 // vandyke SecureCRT sends 1;136;0 | 4783 // vandyke SecureCRT sends 1;136;0 |
4785 else if (version == 136 && arg[2] == 0) | 4784 else if (version == 136 && arg[2] == 0) |
4785 { | |
4786 is_not_xterm = TRUE; | 4786 is_not_xterm = TRUE; |
4787 | |
4788 // PuTTY supports sgr-like mouse reporting, but | |
4789 // only set 'ttymouse' if it was not set by the | |
4790 // user already. | |
4791 if (arg[0] == 0 | |
4792 && !option_was_set((char_u *)"ttym")) | |
4793 set_option_value((char_u *)"ttym", 0L, | |
4794 (char_u *)"sgr", 0); | |
4795 } | |
4787 | 4796 |
4788 // Konsole sends 0;115;0 | 4797 // Konsole sends 0;115;0 |
4789 else if (version == 115 && arg[0] == 0 && arg[2] == 0) | 4798 else if (version == 115 && arg[0] == 0 && arg[2] == 0) |
4790 is_not_xterm = TRUE; | 4799 is_not_xterm = TRUE; |
4791 | 4800 |