instead of lines.
* riece-options.el (riece-shrink-buffer-remove-chars): New user option.
(riece-shrink-buffer-remove-lines): Abolish.
+2004-12-10 Daiki Ueno <ueno@unixuser.org>
+
+ * riece.el (riece-shrink-buffer): Shrink buffer based on chars
+ instead of lines.
+
+ * riece-options.el (riece-shrink-buffer-remove-chars): New user option.
+ (riece-shrink-buffer-remove-lines): Abolish.
+
2004-12-08 Daiki Ueno <ueno@unixuser.org>
* test/test-riece-log.el (test-riece-log-delete-directory):
:type 'integer
:group 'riece-options)
-(defcustom riece-shrink-buffer-remove-lines 10
- "Number of lines removed when shrinking channel buffers."
- :type 'integer
- :group 'riece-options)
-
(defcustom riece-max-buffer-size 65535
"Maximum size of channel buffers."
:type '(radio (integer :tag "Number of characters")
(const nil))
:group 'riece-options)
+(defcustom riece-shrink-buffer-remove-chars (/ riece-max-send-size 2)
+ "Number of chars removed when shrinking channel buffers."
+ :type 'integer
+ :group 'riece-options)
+
(defcustom riece-format-time-function #'current-time-string
"Function to convert the specified time to the human readable form."
:type 'function
(while (> (buffer-size) riece-max-buffer-size)
(let* ((inhibit-read-only t)
buffer-read-only
- (start (point))
- (end (progn (beginning-of-line
- (1+ riece-shrink-buffer-remove-lines))
- (point)))
- (overlays (riece-overlays-in start end)))
+ (end (progn
+ (goto-char riece-shrink-buffer-remove-chars)
+ (beginning-of-line 2)))
+ (overlays (riece-overlays-in (point-min) end)))
(while overlays
(riece-delete-overlay (car overlays))
(setq overlays (cdr overlays)))
- (delete-region start end)))))
+ (delete-region (point-min) end)))))
(defun riece-exit ()
(if riece-save-variables-are-dirty