vte: ignore unset csi parameters in SM/RM

When reading Setmode/Resetmode parameters, we should ignore all unset
parameters instead of printing a warning.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-05-30 17:24:49 +02:00
parent 843bcd3f8a
commit 230db0eebe

View File

@ -822,9 +822,11 @@ static void csi_mode(struct kmscon_vte *vte, bool set)
{
unsigned int i;
for (i = 0; i < CSI_ARG_MAX; ++i) {
for (i = 0; i < vte->csi_argc; ++i) {
if (!(vte->csi_flags & CSI_WHAT)) {
switch (vte->csi_argv[i]) {
case -1:
continue;
case 2: /* KAM */
set_reset_flag(vte, set,
FLAG_KEYBOARD_ACTION_MODE);
@ -849,6 +851,8 @@ static void csi_mode(struct kmscon_vte *vte, bool set)
}
switch (vte->csi_argv[i]) {
case -1:
continue;
case 1: /* DECCKM */
set_reset_flag(vte, set, FLAG_CURSOR_KEY_MODE);
continue;