Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Yuanle Song
zero-el
Commits
cd075a5f
Commit
cd075a5f
authored
Nov 10, 2019
by
Yuanle Song
Browse files
v2.0.7 fix full-width mode support.
support space char in full-width mode.
parent
e328e79f
Changes
2
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
cd075a5f
*.zip
*.elc
*.tar
build/
*.tmp
zero-input.el
View file @
cd075a5f
...
...
@@ -12,7 +12,7 @@
;; See the License for the specific language governing permissions and
;; limitations under the License.
;; Version: 2.0.
4
;; Version: 2.0.
6
;; URL: https://gitlab.emacsos.com/sylecn/zero-el
;; Package-Requires: ((emacs "24.3") (s "1.2.0"))
...
...
@@ -243,7 +243,7 @@ If item is not in lst, return nil."
;; zero-input-el version
(
defvar
zero-input-version
nil
"Zero package version."
)
(
setq
zero-input-version
"2.0.
4
"
)
(
setq
zero-input-version
"2.0.
7
"
)
;; FSM state
(
defconst
zero-input--state-im-off
'IM-OFF
)
...
...
@@ -463,13 +463,17 @@ COMPLETE-FUNC the function to call when build candidates completes."
;; update cache to make SPC and digit key selection possible.
(
funcall
complete-func
candidates
)))
(
defvar
zero-input-full-width-char-map
;; ascii 33 to 126 map to
;; unicode FF01 to FF5E
(
cl-loop
for
i
from
33
to
126
collect
(
cons
(
make-char
'ascii
i
)
(
make-char
'unicode
0
255
(
-
i
32
))))
(
defvar
zero-input-full-width-char-map
nil
"An alist that map half-width char to full-width char."
)
(
setq
zero-input-full-width-char-map
(
cons
;; ascii 32 -> unicode 3000
(
cons
?\s
?\u3000
)
;; ascii [33, 126] -> unicode [FF01, FF5E]
(
cl-loop
for
i
from
33
to
126
collect
(
cons
(
make-char
'ascii
i
)
(
make-char
'unicode
0
255
(
-
i
32
))))))
(
defun
zero-input-convert-ch-to-full-width
(
ch
)
"Convert half-width char CH to full-width.
...
...
@@ -786,8 +790,9 @@ Otherwise, show Zero."
(
:eval
(
zero-input-modeline-string
))
zero-input-mode-map
;; local variables and variable init
(
zero-input-reset
)
(
make-local-variable
'zero-input-candidates-per-page
)
(
make-local-variable
'zero-input-full-width-mode
)
(
zero-input-reset
)
(
zero-input-set-im
zero-input-im
)
;; hooks
(
add-hook
'focus-in-hook
'zero-input-focus-in
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment