From 498637d661df1d5ea3c2a26f3dc5b737bf8447fb Mon Sep 17 00:00:00 2001 From: perry.werneck@gmail.com Date: Tue, 20 Mar 2012 12:21:23 +0000 Subject: [PATCH] Implementando movimentação da caixa de seleção --- selection.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/selection.c b/selection.c index 20d4505..e965fb2 100644 --- a/selection.c +++ b/selection.c @@ -376,7 +376,7 @@ LIB3270_EXPORT int lib3270_move_selection(H3270 *hSession, LIB3270_DIRECTION dir break; case LIB3270_DIR_RIGHT: - if( (hSession->select.end % hSession->cols) >= hSession->cols) + if( (hSession->select.end % hSession->cols) >= (hSession->cols-1)) return EINVAL; hSession->select.begin++; hSession->select.end++; @@ -387,5 +387,7 @@ LIB3270_EXPORT int lib3270_move_selection(H3270 *hSession, LIB3270_DIRECTION dir } update_selection(hSession); + lib3270_set_cursor_address(hSession,hSession->select.end); + return 0; } -- libgit2 0.21.2