Page MenuHomePhabricator

mouse mode not correctly handled wrt termstates
Closed, ResolvedPublic

Description

User's version: the "reset" command should reset the mouse.
Dev's version: _termpty_reset_state() should reset mouse_mode and mouse_ext.

Perhaps there are other prioerties as well...

egmont created this task.Jan 6 2014, 5:10 AM
egmont updated the task description. (Show Details)
egmont raised the priority of this task from to Incoming Queue.
egmont added a project: Terminology.
egmont added a subscriber: egmont.
egmont added a comment.Jan 6 2014, 5:28 AM

In the mean time I'm wondering whether mouse stuff should really belong directly to Termpty, rather than to Termstate.

popadic added a subscriber: popadic.Jan 8 2014, 5:41 AM

It's even worse. Mouse mode is not explicitly set to 0 when creating a new terminal.
As for what should go into termstate and what into termpty directly. Here's my opinion. Right now we have 2 termstates, the second one being for the alternate screen. I would split termstate into termstate and screenstate and put screenstate inside screen. Keeping only one termstate. Reason for this being that when a mode is set it shouldn't be affected by screen swap. So I'd put stuff intrinsic to screen into screenstate. RIS would then reset both termstate and screenstate.
While we're at it. I'd move altbuf into termstate as well. RIS should bring back the primary screen if in alternate screen as well. Basically bring back the state equal to the one at init.

raster triaged this task as Normal priority.Jan 9 2014, 10:07 PM
raster added a subscriber: raster.
raster assigned this task to billiob.Jan 22 2014, 2:59 AM
billiob edited this Maniphest Task.Mar 5 2014, 1:50 PM
billiob renamed this task from "reset" should reset mouse to mouse mode not correctly handled wrt termstates.Dec 7 2014, 2:47 PM
billiob removed billiob as the assignee of this task.Jan 29 2015, 3:26 PM
billiob changed the visibility from "All Users" to "Public (No Login Required)".Feb 18 2015, 12:25 PM
billiob claimed this task.Feb 28 2015, 5:25 AM

will work on it soon

billiob edited this Maniphest Task.Mar 1 2015, 8:39 AM
billiob closed this task as Resolved.Mar 1 2015, 8:39 AM

Closed by commit rTRMb4ba773e1702.

My issue (terminal cursor gone after composing an email message with mutt/vim) is not resolved with the current git version of terminology,

billiob reopened this task as Open.Mar 1 2015, 9:26 AM

Quote from Daniel:

I have an issue with this patch (bisect showed me the path). Here is
the scenario:
Open terminology
Open a file with vi
Split your screen (the orientation doesnt matter)
Come back to vi
The arrow keys don't work anymore. To solve it, I have to ctrl-z vi and
then run fg.

billiob raised the priority of this task from Normal to High.Mar 14 2015, 10:40 AM

@fabian-rump: could you share your vim/mutt configs?

billiob edited this Maniphest Task.Mar 17 2015, 9:48 AM
billiob lowered the priority of this task from High to Trivial.Mar 20 2015, 9:26 AM

As posting files does not seem to work, I will paste the file contents below:

.muttrc

# Automatically log in to this mailbox at startup
set spoolfile="imap://xxxxxxxxxx/INBOX"
set folder="imap://xxxxxxxxxxx/INBOX"
set record="imap://xxxxxxxxxxxx/Sent"
set postponed="imap://xxxxxxxxxxx/Drafts"
set ssl_starttls=yes
set ssl_force_tls=yes
unset imap_passive
set imap_check_subscribed
set mail_check=60
set net_inc=5

macro index c "<change-folder>?<toggle-mailboxes>" "open a different folder"
macro pager c "<change-folder>?<toggle-mailboxes>" "open a different folder"

macro index C "<copy-message>?<toggle-mailboxes>" "copy a message to a mailbox"
macro index M "<save-message>?<toggle-mailboxes>" "move a message to a mailbox"

macro index "d"	   "<save-message>=ARCHIVE" "Save to ARCHIVE mbox"
macro pager "d"    "<save-message>=ARCHIVE" "Save to ARCHIVE mbox"

set delete=yes                          #delete without prompting
set include=yes				#quote msg in reply	
set fast_reply=yes			#no prompting on reply
set beep=no				#no noise
set confirmappend=no			#no prompt for save to =keep      

save-hook .* =ARCHIVE

macro compose A "<attach-message>?<toggle-mailboxes>" "attach message(s) to this message"

set header_cache=~/.muttcache/

set realname="xxxxxxxxxxxxxx"
set from="xxxxxxxxxxxxxxx"
set use_from=yes

set editor="vim"

set mime_forward=yes
set mime_forward_rest=yes

set rfc2047_parameters

# Mailcap
set mailcap_path = $HOME/.mailcap
auto_view text/html

## Theme kindly inspired from                                                                                                                                             
## http://nongeekshandbook.blogspot.ie/2009/03/mutt-color-configuration.html                                                                                              

## Colours for items in the index                                                                                                                                         
color index brightcyan black ~N
color index brightred black ~O
color index brightyellow black ~F
color index black green ~T
color index brightred black ~D
mono index bold ~N
mono index bold ~F
mono index bold ~T
mono index bold ~D

## Highlights inside the body of a message.                                                                                                                               

## URLs                                                                                                                                                                    
color body brightgreen black "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*"
color body brightgreen black "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"
mono body bold "(http|ftp|news|telnet|finger)://[^ \"\t\r\n]*"
mono body bold "mailto:[-a-z_0-9.]+@[-a-z_0-9.]+"

## Email addresses.                                                                                                                                                       
color body brightgreen black "[-a-z_0-9.%$]+@[-a-z_0-9.]+\\.[-a-z][-a-z]+"

## Header                                                                                                                                                                 
color header green black "^from:"
color header green black "^to:"
color header green black "^cc:"
color header green black "^date:"
color header yellow black "^newsgroups:"
color header yellow black "^reply-to:"
color header brightcyan black "^subject:"
color header red black "^x-spam-rule:"
color header green black "^x-mailer:"
color header yellow black "^message-id:"
color header yellow black "^Organization:"
color header yellow black "^Organisation:"
color header yellow black "^User-Agent:"
color header yellow black "^message-id: .*pine"
color header yellow black "^X-Fnord:"
color header yellow black "^X-WebTV-Stationery:"

color header red black "^x-spam-rule:"
color header green black "^x-mailer:"
color header yellow black "^message-id:"
color header yellow black "^Organization:"
color header yellow black "^Organisation:"
color header yellow black "^User-Agent:"
color header yellow black "^message-id: .*pine"
color header yellow black "^X-Fnord:"
color header yellow black "^X-WebTV-Stationery:"
color header yellow black "^X-Message-Flag:"
color header yellow black "^X-Spam-Status:"
color header yellow black "^X-SpamProbe:"
color header red black "^X-SpamProbe: SPAM"

## Coloring quoted text - coloring the first 7 levels:                                                                                                                    
color quoted cyan black
color quoted1 yellow black
color quoted2 red black
color quoted3 green black
color quoted4 cyan black
color quoted5 yellow black
color quoted6 red black
color quoted7 green black

## Default color definitions                                                                                                                                              
#color hdrdefault white green                                                                                                                                             
color signature brightmagenta black
color indicator black cyan
color attachment black green
color error red black
color message white black
color search brightwhite magenta
color status brightyellow blue
color tree brightblue black
color normal white black
color tilde green black
color bold brightyellow black
#color underline magenta black                                                                                                                                            
color markers brightcyan black

## Colour definitions when on a mono screen                                                                                                                               
mono bold bold
mono underline underline
mono indicator reverse


# GPG Stuff

set pgp_decode_command="gpg %?p?--passphrase-fd 0? --no-verbose --batch --output - %f"
set pgp_verify_command="gpg --no-verbose --batch --output - --verify %s %f"
set pgp_decrypt_command="gpg --passphrase-fd 0 --no-verbose --batch --output - %f"
set pgp_sign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_clearsign_command="gpg --no-verbose --batch --output - --passphrase-fd 0 --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_encrypt_only_command="pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust --encrypt-to 0x7C32E949 -- -r %r -- %f"
set pgp_encrypt_sign_command="pgpewrap gpg --passphrase-fd 0 --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust --encrypt-to 0x7C32E949 -- -r %r -- %f"
set pgp_import_command="gpg --no-verbose --import -v %f"
set pgp_export_command="gpg --no-verbose --export --armor %r"
set pgp_verify_key_command="gpg --no-verbose --batch --fingerprint --check-sigs %r"
set pgp_list_pubring_command="gpg --no-verbose --batch --with-colons --list-keys %r" 
set pgp_list_secring_command="gpg --no-verbose --batch --with-colons --list-secret-keys %r" 
set pgp_autosign=yes
set pgp_sign_as=xxxxxxxxxxxxxx
set pgp_replyencrypt=yes
set pgp_timeout=1800
set pgp_good_sign="^gpg: Good signature from"

# Support old Style GPG
message-hook '!(~g|~G) ~b"^-----BEGIN\ PGP\ (SIGNED\ )?MESSAGE"' "exec check-traditional-pgp"


# No S/MIME
set crypt_autosmime=no

.vimrc

au BufRead /tmp/mutt-* set tw=72
syntax on

set expandtab
set shiftwidth=4
set softtabstop=4

set smartindent

filetype plugin indent on
set grepprg=grep\ -nH\ $*
let g:tex_flavor = "latex"
let g:Tex_DefaultTargetFormat = "pdf"
let g:Tex_FoldedSections = ""
let g:Tex_FoldedMisc = ""
billiob raised the priority of this task from Trivial to Normal.Apr 4 2015, 9:08 AM