Skip to content

Commit 351997d

Browse files
author
Chen Bin
committed
#21 fixed a crash
1 parent ae5eedc commit 351997d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22
name=wucuo
3-
version=0.3.1
3+
version=0.3.2
44
pkg=$name-$version
55
mkdir $pkg
66
cp *.el $pkg

wucuo.el

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
;; Copyright (C) 2018-2023 Chen Bin
44
;;
5-
;; Version: 0.3.1
5+
;; Version: 0.3.2
66
;; Keywords: convenience
77
;; Author: Chen Bin <chenbin DOT sh AT gmail DOT com>
88
;; URL: https://github.com/redguardtoo/wucuo
@@ -553,14 +553,14 @@ Returns t to continue checking, nil otherwise."
553553
;;;###autoload
554554
(defun wucuo-version ()
555555
"Output version."
556-
(message "0.3.1"))
556+
(message "0.3.2"))
557557

558558
;;;###autoload
559559
(defun wucuo-spell-check-visible-region ()
560560
"Spell check visible region in current buffer."
561561
(interactive)
562-
(let* ((beg (window-start))
563-
(end (window-end)))
562+
(let* ((beg (max (point-min) (window-start)))
563+
(end (min (point-max) (window-end))))
564564
(when (< (- end beg) wucuo-spell-check-region-max)
565565
(if wucuo-debug (message "wucuo-spell-check-visible-region called from %s to %s; major-mode=%s" beg end major-mode))
566566
;; See https://emacs-china.org/t/flyspell-mode-wucuo-0-2-0/13274/46

0 commit comments

Comments
 (0)