mike-jumper commented on a change in pull request #237: GUACAMOLE-871: Add
support for hidden cursor (DECTECM)
URL: https://github.com/apache/guacamole-server/pull/237#discussion_r334691512
##########
File path: src/terminal/terminal.c
##########
@@ -1240,7 +1253,8 @@ static void __guac_terminal_resize(guac_terminal* term,
int width, int height) {
/* Update buffer top and cursor row based on shift */
term->buffer->top += shift_amount;
term->cursor_row -= shift_amount;
- term->visible_cursor_row -= shift_amount;
+ if (term->visible_cursor_row != -1)
Review comment:
Any reason a sentinel value of -1 is being used vs. the `cursor_visible`
flag?
If -1 is going to be a value assigned to `visible_cursor_row` and
`visible_cursor_col` to indicate that the cursor is not rendered, that should
be documented where those properties are defined, however I'm not sure of the
utility of a -1 constant when there is a boolean flag also in use and with
clear semantics.
If the -1 sentinel is not needed after all, and `cursor_visible` is
preferred, it would be good to document that the values of the
`visible_cursor_row`, etc. properties have no meaning if `cursor_visible` is
`true`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services