Ticket #2544: search dialog trim spaces
commitb375236b536e341530e14bcb287da6566d586732
authorSlava Zanko <slavazanko@gmail.com>
Tue, 31 May 2011 11:11:01 +0000 (31 14:11 +0300)
committerSlava Zanko <slavazanko@gmail.com>
Tue, 31 May 2011 15:50:31 +0000 (31 18:50 +0300)
tree5de261f4798b6744e224b8694902e44071ea7b6a
parent23308648e4747b01068e39356d76d672e19ec4bc
Ticket #2544: search dialog trim spaces

What steps will reproduce the problem?

 * View some text (log) file (F3), or edit (F4).
 * Open search dialog (F7).
 * Enter string starting with space and ending with space (I used " ERROR " without quotes), press Enter
 * Press F7 to open search dialog again.

What is the expected output?
 * Original string in search dialog (" ERROR " without quotes)

What do you see instead?
 * "ERROR " (without leading space!)

What solution?
 * In function mc_config_set_string_raw() use g_key_file_set_string() instead of g_key_file_set_value()
 * change src/learn.c for handle new behavior
 * write some tests for new behavior

Signed-off-by: Slava Zanko <slavazanko@gmail.com>
configure.ac
lib/mcconfig/set.c
lib/tests/Makefile.am
lib/tests/mcconfig/Makefile.am [new file with mode: 0644]
lib/tests/mcconfig/config_string.c [new file with mode: 0644]
src/learn.c