Commit 498637d661df1d5ea3c2a26f3dc5b737bf8447fb

Authored by perry.werneck@gmail.com
1 parent 5897edf1

Implementando movimentação da caixa de seleção

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
@@ -376,7 +376,7 @@ LIB3270_EXPORT int lib3270_move_selection(H3270 *hSession, LIB3270_DIRECTION dir @@ -376,7 +376,7 @@ LIB3270_EXPORT int lib3270_move_selection(H3270 *hSession, LIB3270_DIRECTION dir
376 break; 376 break;
377 377
378 case LIB3270_DIR_RIGHT: 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 return EINVAL; 380 return EINVAL;
381 hSession->select.begin++; 381 hSession->select.begin++;
382 hSession->select.end++; 382 hSession->select.end++;
@@ -387,5 +387,7 @@ LIB3270_EXPORT int lib3270_move_selection(H3270 *hSession, LIB3270_DIRECTION dir @@ -387,5 +387,7 @@ LIB3270_EXPORT int lib3270_move_selection(H3270 *hSession, LIB3270_DIRECTION dir
387 } 387 }
388 388
389 update_selection(hSession); 389 update_selection(hSession);
  390 + lib3270_set_cursor_address(hSession,hSession->select.end);
  391 +
390 return 0; 392 return 0;
391 } 393 }