term: osc-8: open: typo: close previous URL if ‘begin’ coords are *non-negative*

This commit is contained in:
Daniel Eklöf 2021-02-14 17:12:43 +01:00
parent 4ff5154cb8
commit 20ff492d33
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F

View file

@ -3018,7 +3018,7 @@ term_ime_set_cursor_rect(struct terminal *term, int x, int y, int width,
void
term_osc8_open(struct terminal *term, uint64_t id, const char *uri)
{
if (unlikely(term->vt.osc8.begin.row < 0)) {
if (unlikely(term->vt.osc8.begin.row >= 0)) {
/* Its valid to switch from one URI to another without
* closing the first one */
term_osc8_close(term);