Browse Source

Scroll log window after appending text

- Automatic scroll sometimes does not appear to work as expected.
  Add an explicit command to scroll to current selection.

Signed-off-by: Selva Nair <selva.nair@gmail.com>
pull/608/head
Selva Nair 2 years ago
parent
commit
9a1e6b08c6
  1. 3
      openvpn.c

3
openvpn.c

@ -219,6 +219,9 @@ OnLogLine(connection_t *c, char *line)
SendMessage(logWnd, EM_REPLACESEL, FALSE, (LPARAM) datetime);
SendMessage(logWnd, EM_SETTEXTEX, (WPARAM) &ste, (LPARAM) message);
SendMessage(logWnd, EM_REPLACESEL, FALSE, (LPARAM) _T("\n"));
/* scroll to the caret */
SendMessage(logWnd, EM_SCROLLCARET, 0, 0);
}
/* expect ipv4,remote,port,,,ipv6 */

Loading…
Cancel
Save