aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2020-05-25 14:01:19 +0100
committerThomas Adam <thomas@xteddy.org>2020-05-25 14:01:19 +0100
commit32ce468b22aaffac466fe1fc07a431a2da0fbf32 (patch)
treec72429ea723aff4096785712d37792bd10634162
parentbb5a1925ab30eec3640169b0924f71fe132a2e62 (diff)
parent4589297e43ad4b385c9110879aab8338d7c45474 (diff)
downloadrtmux-32ce468b22aaffac466fe1fc07a431a2da0fbf32.tar.gz
rtmux-32ce468b22aaffac466fe1fc07a431a2da0fbf32.tar.bz2
rtmux-32ce468b22aaffac466fe1fc07a431a2da0fbf32.zip
Merge branch 'obsd-master'
-rw-r--r--menu.c1
-rw-r--r--window-copy.c2
2 files changed, 2 insertions, 1 deletions
diff --git a/menu.c b/menu.c
index 7f6933c5..16374115 100644
--- a/menu.c
+++ b/menu.c
@@ -111,6 +111,7 @@ menu_create(const char *title)
menu = xcalloc(1, sizeof *menu);
menu->title = xstrdup(title);
+ menu->width = format_width(title);
return (menu);
}
diff --git a/window-copy.c b/window-copy.c
index 1efe01d0..b869fc83 100644
--- a/window-copy.c
+++ b/window-copy.c
@@ -3167,7 +3167,7 @@ window_copy_match_at_cursor(struct window_copy_mode_data *data)
*/
for (at = start; at <= end; at++) {
py = at / sx;
- px = at % (py * sx);
+ px = at - (py * sx);
grid_get_cell(gd, px, py, &gc);
buf = xrealloc(buf, len + gc.data.size + 1);