From 4c4d4d3eb3fd2bdeefb034a524f02b803f4583ab Mon Sep 17 00:00:00 2001 From: Baptiste Jonglez Date: Thu, 31 May 2012 18:11:53 +0200 Subject: Use mvwaddstr() instead of mvwprintw() When we only want to display a string at a specific place of the screen, there's no need to use the more complex mvwprintw(), use mvwaddstr() instead. This should be slightly more efficient, and, above all, it prevents weird things to happen if our string contains a '%', being interpreted as an unwanted format string. Signed-off-by: Baptiste Jonglez Signed-off-by: Lukas Fleischer --- src/keys.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/keys.c') diff --git a/src/keys.c b/src/keys.c index 23ee61f..3392cfc 100644 --- a/src/keys.c +++ b/src/keys.c @@ -416,9 +416,9 @@ keys_display_bindings_bar(WINDOW * win, struct binding *bindings[], int count, fmtkey = keys_format_label(key, KEYS_KEYLEN); custom_apply_attr(win, ATTR_HIGHEST); - mvwprintw(win, key_pos_y, key_pos_x, fmtkey); + mvwaddstr(win, key_pos_y, key_pos_x, fmtkey); custom_remove_attr(win, ATTR_HIGHEST); - mvwprintw(win, label_pos_y, label_pos_x, binding->label); + mvwaddstr(win, label_pos_y, label_pos_x, binding->label); } wnoutrefresh(win); } -- cgit v1.2.3-54-g00ecf