mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 01:34:18 +00:00 
			
		
		
		
	Tweak previous - check for a NULL client and simplify manual text.
This commit is contained in:
		@@ -202,17 +202,29 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
 | 
				
			|||||||
		sy = 24;
 | 
							sy = 24;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if ((is_control || detached) && args_has(args, 'x')) {
 | 
						if ((is_control || detached) && args_has(args, 'x')) {
 | 
				
			||||||
		sx = strtonum(args_get(args, 'x'), 1, USHRT_MAX, &errstr);
 | 
							tmp = args_get(args, 'x');
 | 
				
			||||||
		if (errstr != NULL) {
 | 
							if (strcmp(tmp, "-") == 0) {
 | 
				
			||||||
			cmdq_error(item, "width %s", errstr);
 | 
								if (c != NULL)
 | 
				
			||||||
			goto error;
 | 
									sx = c->tty.sx;
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								sx = strtonum(tmp, 1, USHRT_MAX, &errstr);
 | 
				
			||||||
 | 
								if (errstr != NULL) {
 | 
				
			||||||
 | 
									cmdq_error(item, "width %s", errstr);
 | 
				
			||||||
 | 
									goto error;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if ((is_control || detached) && args_has(args, 'y')) {
 | 
						if ((is_control || detached) && args_has(args, 'y')) {
 | 
				
			||||||
		sy = strtonum(args_get(args, 'y'), 1, USHRT_MAX, &errstr);
 | 
							tmp = args_get(args, 'y');
 | 
				
			||||||
		if (errstr != NULL) {
 | 
							if (strcmp(tmp, "-") == 0) {
 | 
				
			||||||
			cmdq_error(item, "height %s", errstr);
 | 
								if (c != NULL)
 | 
				
			||||||
			goto error;
 | 
									sy = c->tty.sy;
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								sy = strtonum(tmp, 1, USHRT_MAX, &errstr);
 | 
				
			||||||
 | 
								if (errstr != NULL) {
 | 
				
			||||||
 | 
									cmdq_error(item, "height %s", errstr);
 | 
				
			||||||
 | 
									goto error;
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	if (sx == 0)
 | 
						if (sx == 0)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								tmux.1
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								tmux.1
									
									
									
									
									
								
							@@ -851,6 +851,8 @@ the initial size is 80 x 24;
 | 
				
			|||||||
and
 | 
					and
 | 
				
			||||||
.Fl y
 | 
					.Fl y
 | 
				
			||||||
can be used to specify a different size.
 | 
					can be used to specify a different size.
 | 
				
			||||||
 | 
					.Ql -
 | 
				
			||||||
 | 
					uses the size of the current client if any.
 | 
				
			||||||
.Pp
 | 
					.Pp
 | 
				
			||||||
If run from a terminal, any
 | 
					If run from a terminal, any
 | 
				
			||||||
.Xr termios 4
 | 
					.Xr termios 4
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user