diff --git a/src/erow.c b/src/erow.c index c47b3db..80ab112 100644 --- a/src/erow.c +++ b/src/erow.c @@ -77,6 +77,9 @@ int erow_rx_to_cx(struct erow *erow, int rx) { c_rx += KILO_TAB_STOP - (c_rx % KILO_TAB_STOP); else c_rx++; + + if (c_rx > rx) + break; } return cx;