diff options
author | Richard M. Stallman <[email protected]> | 1997-08-07 09:01:52 +0000 |
---|---|---|
committer | Richard M. Stallman <[email protected]> | 1997-08-07 09:01:52 +0000 |
commit | 7050d53077c688c259520841687b963c605f57f3 (patch) | |
tree | b63a076e0dd2e2a7e2e746ca64978e872a0bc8f5 | |
parent | 2cad2e34fa62554599848cef2a5fda8efa0350b0 (diff) |
(current_column): Update ptr differently at newline
so that current_column_bol_cache is set properly.
-rw-r--r-- | src/indent.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/indent.c b/src/indent.c index 5b51e405b6..a6fa7a9242 100644 --- a/src/indent.c +++ b/src/indent.c @@ -349,10 +349,12 @@ current_column () col += XVECTOR (DISP_CHAR_VECTOR (dp, c))->size; else if (c >= 040 && c < 0177) col++; - else if (c == '\n') - break; - else if (c == '\r' && EQ (current_buffer->selective_display, Qt)) - break; + else if (c == '\n' + || (c == '\r' && EQ (current_buffer->selective_display, Qt))) + { + ptr++; + break; + } else if (c == '\t') { if (tab_seen) @@ -375,7 +377,7 @@ current_column () if (ptr == BEGV_ADDR) current_column_bol_cache = BEGV; else - current_column_bol_cache = PTR_CHAR_POS ((ptr+1)); + current_column_bol_cache = PTR_CHAR_POS (ptr); last_known_column = col; last_known_column_point = PT; last_known_column_modified = MODIFF; |