Commit 498637d661df1d5ea3c2a26f3dc5b737bf8447fb
1 parent
5897edf1
Exists in
master
and in
3 other branches
Implementando movimentação da caixa de seleção
Showing
1 changed file
with
3 additions
and
1 deletions
Show diff stats
selection.c
... | ... | @@ -376,7 +376,7 @@ LIB3270_EXPORT int lib3270_move_selection(H3270 *hSession, LIB3270_DIRECTION dir |
376 | 376 | break; |
377 | 377 | |
378 | 378 | case LIB3270_DIR_RIGHT: |
379 | - if( (hSession->select.end % hSession->cols) >= hSession->cols) | |
379 | + if( (hSession->select.end % hSession->cols) >= (hSession->cols-1)) | |
380 | 380 | return EINVAL; |
381 | 381 | hSession->select.begin++; |
382 | 382 | hSession->select.end++; |
... | ... | @@ -387,5 +387,7 @@ LIB3270_EXPORT int lib3270_move_selection(H3270 *hSession, LIB3270_DIRECTION dir |
387 | 387 | } |
388 | 388 | |
389 | 389 | update_selection(hSession); |
390 | + lib3270_set_cursor_address(hSession,hSession->select.end); | |
391 | + | |
390 | 392 | return 0; |
391 | 393 | } | ... | ... |