]> git.baikalelectronics.ru Git - kernel.git/commit
scripts/kconfig/nconf: fix editing long strings
authorCheng Renquan <crquan@gmail.com>
Thu, 1 Sep 2011 17:52:21 +0000 (10:52 -0700)
committerMichal Marek <mmarek@suse.cz>
Fri, 9 Sep 2011 12:40:08 +0000 (14:40 +0200)
commit09bc1b05d559d07c38161a5e2b517bb0784a4df0
treeabcd76bf12c0ea7d6a34f16a0d1b874411d4d827
parent9e1b69ec912315c780c17761e8c7f2ab96f7ec08
scripts/kconfig/nconf: fix editing long strings

The original dialog_inputbox doesn't work with longer than prompt_width
strings, here fixed it in this way:
1) add variable cursor_form_win to record cursor of form_win,
   keep its value always between [0, prompt_width-1];
   reuse the original cursor_position as cursor of the string result,
   use (cursor_position-cursor_form_win) as begin offset to show part of
   the string in form_win;

Signed-off-by: Cheng Renquan <crquan@gmail.com>
Cc: Arnaud Lacombe <lacombar@gmail.com>
Cc: Nir Tzachar <nir.tzachar@gmail.com>
scripts/kconfig/nconf.gui.c