Tmux Scroll on OS X Yosemite Terminal

2014-11-10 Thread Landon Schropp
With the new release of OS X Yosemite, I was delighted to find that Apple
has included support for mouse in the Terminal app. This works perfectly in
utilities like less and vim. However, if I try to use my trackpadto scroll
in tmux, it scrolls through my command history rather than scrolling
through the scroll buffer. Is there a way to fix this in the tmux
configuration?

Here's what my .tmux.conf file looks like:

# INTERFACE

# enable mouse support
set-window-option -g mode-mouse on

# set up the default command to ensure the window's name is empty if it's
not already defined and
# to reattach the user namespace to the current shell
set-option -g default-command 'reattach-to-user-namespace -l $SHELL;'

# modify the split pane keyboard shortcuts
unbind %
unbind ''
bind '' split-window -h
bind = split-window -v

# rebind the c shortcut so it creates a window with an empty name
bind-key c new-window -n ''

# set the window title to be the current session's name
set -g set-titles on
set -g set-titles-string '#S'
set-window-option -g automatic-rename off

# STATUS BAR

# start counting the window panes at 1 instead of 0
set -g base-index 1
set -g pane-base-index 1

# default colors and font weights
set -g status-fg white
set -g status-bg colour234
set -g window-status-activity-attr bold
set -g pane-border-fg colour245
set -g pane-active-border-fg colour39
set -g message-fg colour16
set -g message-bg colour221
set -g message-attr bold

# status left
set -g status-right 
set -g status-left-length 32
set -g status-left '#[fg=colour235,bg=colour252,bold] #S '

# window status
set -g window-status-format #[fg=white,bg=colour234] #I: #W 
set -g window-status-current-format
#[fg=colour235,bg=colour39,noreverse,bold] #I: #W 

Thanks in advance for the help!
--
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


[tmux:tickets] #166 Add a choose-pane command

2014-11-10 Thread Markus Koller



---

** [tickets:#166] Add a choose-pane command**

**Status:** open
**Created:** Sun Nov 09, 2014 03:25 PM UTC by Markus Koller
**Last Updated:** Sun Nov 09, 2014 03:25 PM UTC
**Owner:** nobody

Similar to the `choose-window` etc. commands, a `choose-pane` command would 
be useful to interactively select a pane of the current window.


---

Sent from sourceforge.net because tmux-users@lists.sourceforge.net is 
subscribed to https://sourceforge.net/p/tmux/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/tmux/admin/tickets/options.  Or, if this is a mailing 
list, you can unsubscribe from the mailing list.--
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Tmux Scroll on OS X Yosemite Terminal

2014-11-10 Thread Nicholas Marriott
Sounds like it's not actually supporting the mouse properly but instead
just sending cursor movement commands. Possibly it expects tmux to turn
it on in a different way.


On Sun, Nov 09, 2014 at 02:23:52PM -0800, Landon Schropp wrote:
With the new release of OS X Yosemite, I was delighted to find that Apple
has included support for mouse in the Terminal app. This works perfectly
in utilities like less and vim. However, if I try to use my trackpadto
scroll in tmux, it scrolls through my command history rather than
scrolling through the scroll buffer. Is there a way to fix this in the
tmux configuration?
Here's what my .tmux.conf file looks like:
# INTERFACE
# enable mouse support
set-window-option -g mode-mouse on
# set up the default command to ensure the window's name is empty if it's
not already defined and
# to reattach the user namespace to the current shell
set-option -g default-command 'reattach-to-user-namespace -l $SHELL;'
# modify the split pane keyboard shortcuts
unbind %
unbind ''
bind '' split-window -h
bind = split-window -v
# rebind the c shortcut so it creates a window with an empty name
bind-key c new-window -n ''
# set the window title to be the current session's name
set -g set-titles on
set -g set-titles-string '#S'
set-window-option -g automatic-rename off
# STATUS BAR
# start counting the window panes at 1 instead of 0
set -g base-index 1
set -g pane-base-index 1
# default colors and font weights
set -g status-fg white
set -g status-bg colour234
set -g window-status-activity-attr bold
set -g pane-border-fg colour245
set -g pane-active-border-fg colour39
set -g message-fg colour16
set -g message-bg colour221
set -g message-attr bold
# status left
set -g status-right 
set -g status-left-length 32
set -g status-left '#[fg=colour235,bg=colour252,bold] #S '
# window status
set -g window-status-format #[fg=white,bg=colour234] #I: #W 
set -g window-status-current-format
#[fg=colour235,bg=colour39,noreverse,bold] #I: #W 
Thanks in advance for the help!

 --

 ___
 tmux-users mailing list
 tmux-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/tmux-users


--
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: [PATCH 1/2] Fix broken reflowing after insert/delete characters

2014-11-10 Thread Nicholas Marriott
Hi

I reverted the grid-view.c change because it breaks insertion. Try:

$ tmux new 'tput ich 10'

I guess probably the line does need to be extended a bit...




On Sat, Nov 08, 2014 at 12:58:52PM +, Nicholas Marriott wrote:
 Both this and the other one make sense to me - applied, thanks!
 
 
 On Fri, Nov 07, 2014 at 04:31:10PM +, Balazs Kezes wrote:
  Steps to reproduce:
  1. Create a vertical split.
  2. Assuming we are running bash in the left pane, enter this:
 echo -e 'xy\e[D\e[@'
 # or
 echo -e 'xyz\e[2D\e[P'
  3. Make the left pane smaller:
 tmux resize-pane -L 5
  4. Observe the extra newline. This is ugly.
  
  This happens because whenever insert/delete characters in a line, we
  extend that line to full width with blanks at the end. This patch will
  use the real length instead.
  
  This is especially annoying if you use readline's insert-comment a lot
  which uses this facility to insert the comment at the beginning of the
  line.
  ---
   grid-view.c | 4 ++--
   1 file changed, 2 insertions(+), 2 deletions(-)
  
  diff --git a/grid-view.c b/grid-view.c
  index e75b604..45737e3 100644
  --- a/grid-view.c
  +++ b/grid-view.c
  @@ -184,7 +184,7 @@ grid_view_insert_cells(struct grid *gd, u_int px, u_int 
  py, u_int nx)
  px = grid_view_x(gd, px);
  py = grid_view_y(gd, py);
   
  -   sx = grid_view_x(gd, gd-sx);
  +   sx = grid_view_x(gd, gd-linedata[py].cellsize);
   
  if (px == sx - 1)
  grid_clear(gd, px, py, 1, 1);
  @@ -201,7 +201,7 @@ grid_view_delete_cells(struct grid *gd, u_int px, u_int 
  py, u_int nx)
  px = grid_view_x(gd, px);
  py = grid_view_y(gd, py);
   
  -   sx = grid_view_x(gd, gd-sx);
  +   sx = grid_view_x(gd, gd-linedata[py].cellsize);
   
  grid_move_cells(gd, px, px + nx, py, sx - px - nx);
  grid_clear(gd, sx - nx, py, px + nx - (sx - nx), 1);
  -- 
  2.1.3
  
  
  --
  ___
  tmux-users mailing list
  tmux-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/tmux-users

--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: [PATCH 1/2] Fix broken reflowing after insert/delete characters

2014-11-10 Thread Balazs Kezes
On 2014-11-10 20:04 +, Nicholas Marriott wrote:
 I reverted the grid-view.c change because it breaks insertion. Try:
 $ tmux new 'tput ich 10'

Oh, sorry about that. What a silly mistake, the 4th parameter
underflows in grid_move_cells:

...
#1  0x0042a3f9 in log_fatal (msg=0x46e461 %s: %s) at log.c:105
#2  0x00458dba in xreallocarray (oldptr=0x0, nmemb=4294967286, size=14) 
at xmalloc.c:92
#3  0x0042073b in grid_expand_line (gd=0x1af9790, py=1, sx=4294967286) 
at grid.c:226
#4  0x00420d89 in grid_move_cells (gd=0x1af9790, dx=10, px=0, py=1, 
nx=4294967286) at grid.c:381
#5  0x00420182 in grid_view_insert_cells (gd=0x1af9790, px=0, py=1, 
nx=10) at grid-view.c:192
#6  0x00432d14 in screen_write_insertcharacter (ctx=0x1af9528, nx=10) 
at screen-write.c:543
...

How about this as the bugfix:

diff --git a/grid-view.c b/grid-view.c
index 45737e3..39017c1 100644
--- a/grid-view.c
+++ b/grid-view.c
@@ -185,6 +185,8 @@ grid_view_insert_cells(struct grid *gd, u_int px, u_int py, 
u_int nx)
py = grid_view_y(gd, py);
 
sx = grid_view_x(gd, gd-linedata[py].cellsize);
+   if (sx  px + nx)
+   sx = px + nx;
 
if (px == sx - 1)
grid_clear(gd, px, py, 1, 1);
@@ -202,6 +204,8 @@ grid_view_delete_cells(struct grid *gd, u_int px, u_int py, 
u_int nx)
py = grid_view_y(gd, py);
 
sx = grid_view_x(gd, gd-linedata[py].cellsize);
+   if (sx  px + nx)
+   sx = px + nx;
 
grid_move_cells(gd, px, px + nx, py, sx - px - nx);
grid_clear(gd, sx - nx, py, px + nx - (sx - nx), 1);

-- 
Balazs

--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://pubads.g.doubleclick.net/gampad/clk?id=154624111iu=/4140/ostg.clktrk
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users