On macOS ARM64 both flags are defined. Accessor functions for search
strings, vi command buffer, menu prefix, and original buffer checked
USE_MEMORY_POOL first, dereferencing uninitialized pool refs → SIGSEGV
in Ctrl+R search, vi-mode commands, tab completion, and undo.
Fix accessor guards only (not init/cleanup) to avoid flang-new codegen
butterfly effect that silently breaks echo output when init blocks are
restructured.
Also sync editing_mode from global_editing_mode on each readline call
so set -o vi / set -o emacs takes effect immediately.
Root cause: in raw mode, bare LF moves cursor down without returning to
column 0. Multi-line prompts and Enter key sent bare LF, causing cursor
to drift right. Fix: replace all LF with CR+LF in prompt printing, Enter
handler, and redraw code. Also keep raw mode across continuation calls.