aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/interface-curses.cpp
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-10 01:43:08 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2015-03-10 01:43:08 +0100
commit3db42f84371cf7ae9c1ec6cbf3668424645c7479 (patch)
treebac2cdc1e22a22d63b1c38526750ed367520130e /src/interface-curses.cpp
parentf279d24cee923141a045ab5eb8fb0d037deac8fb (diff)
downloadsciteco-3db42f84371cf7ae9c1ec6cbf3668424645c7479.tar.gz
optimized Interface::info_update() implementations
* use g_strconcat() instead of g_strdup_printf() * InterfaceGtk::info_update() now longer has an arbitrary 255 byte limit on the length of the info line.
Diffstat (limited to 'src/interface-curses.cpp')
-rw-r--r--src/interface-curses.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/interface-curses.cpp b/src/interface-curses.cpp
index a9bb466..7a242cd 100644
--- a/src/interface-curses.cpp
+++ b/src/interface-curses.cpp
@@ -245,8 +245,8 @@ InterfaceCurses::info_update_impl(const QRegister *reg)
gchar *name = String::canonicalize_ctl(reg->name);
g_free(info_current);
- info_current = g_strdup_printf("%s - <QRegister> %s",
- PACKAGE_NAME, name);
+ info_current = g_strconcat(PACKAGE_NAME " - <QRegister> ",
+ name, NIL);
g_free(name);
draw_info();
@@ -256,9 +256,9 @@ void
InterfaceCurses::info_update_impl(const Buffer *buffer)
{
g_free(info_current);
- info_current = g_strdup_printf("%s - <Buffer> %s%s", PACKAGE_NAME,
- buffer->filename ? : UNNAMED_FILE,
- buffer->dirty ? "*" : "");
+ info_current = g_strconcat(PACKAGE_NAME " - <Buffer> ",
+ buffer->filename ? : UNNAMED_FILE,
+ buffer->dirty ? "*" : "", NIL);
draw_info();
}