summaryrefslogtreecommitdiff
path: root/src/indent.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/indent.c')
-rw-r--r--src/indent.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/indent.c b/src/indent.c
index d4ef075f001..e90e3fde203 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -306,6 +306,8 @@ and point (e.g., control characters will have a width of 2 or 4, tabs
will have a variable width).
Ignores finite width of frame, which means that this function may return
values greater than (frame-width).
+In a buffer with very long lines, the value can be zero, because calculating
+the exact number is very expensive.
Whether the line is visible (if `selective-display' is t) has no effect;
however, ^M is treated as end of line when `selective-display' is t.
Text that has an invisible property is considered as having width 0, unless
@@ -313,6 +315,9 @@ Text that has an invisible property is considered as having width 0, unless
(void)
{
Lisp_Object temp;
+
+ if (current_buffer->long_line_optimizations_p)
+ return make_fixnum (0);
XSETFASTINT (temp, current_column ());
return temp;
}