In GNU Emacs 27.0.50 (build 1, x86_64-apple-darwin17.7.0, NS appkit-1561.61 Version 10.13.6 (Build 17G10021))  of 2019-12-23 built on jundeMac Repository revision: 3ee8ee8476fef2a5e8159f7597e36e0953295ce2 Repository branch: mod Windowing system distributor ‘Apple', version 10.3.1561 System Description: Mac OS X 10.13.6 Reproduction steps: 1. emacs -Q 2. open the test file in attachment(a.cpp) 3. M-x toggle-truncate-lines 4. M-x global-hl-line 5. shrink the width of the emacs window so that the longest line(#12) can’t be fully visible 6. go to line 12 and press C-e to goto end of line 7. the cursor is not at the end of line and you can’t move the cursor to end of line Recent messages: For information about GNU Emacs and the GNU system, type C-h C-a. Truncate long lines enabled Global Hl-Line mode enabled next-line: End of buffer delete-backward-char: Text is read-only funcall-interactively: End of buffer [3 times] Configured using:  ‘configure —with-ns '--enable-locallisppath=/Library/Application  Support/Emacs/${version}/site-lisp:/Library/Application  Support/Emacs/site-lisp’ --with-modules --disable-acl  —without-makeinfo CFLAGS=-O2’ Configured features: RSVG GLIB NOTIFY KQUEUE GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS PDUMPER LCMS2 GMP Important settings:   value of $LANG: zh_CN.UTF-8   locale-coding-system: utf-8-unix Major mode: C++//l Minor modes in effect:   global-hl-line-mode: t   tooltip-mode: t   global-eldoc-mode: t   electric-indent-mode: t   mouse-wheel-mode: t   tool-bar-mode: t   menu-bar-mode: t   file-name-shadow-mode: t   global-font-lock-mode: t   font-lock-mode: t   blink-cursor-mode: t   auto-composition-mode: t   auto-encryption-mode: t   auto-compression-mode: t   line-number-mode: t   transient-mark-mode: t   abbrev-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs format-spec rfc822 mml mml-sec password-cache epa derived epg epg-config gnus-util rmail rmail-loaddefs text-property-search time-date subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils cus-start cus-load hl-line vc-git diff-mode easy-mmode cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs cl-loaddefs cl-lib china-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns lcms2 multi-tty make-network-process emacs) Memory information: ((conses 16 80300 14394)  (symbols 48 9922 0)  (strings 32 24946 2210)  (string-bytes 1 886243)  (vectors 16 14651)  (vector-slots 8 229697 4904)  (floats 8 23 40)  (intervals 56 259 0)  (buffers 1000 12))