On 2024-10-22 07:40, Eli Zaretskii wrote: > Paul, should we make line_hash_code return 'size_t' instead (and > change the data type of the variables in 'scrolling' accordingly)? Or > maybe we should simply mask off high bits of the face_cache's pointer, > leaving only the low 32 bits, before adding it to the hash? Either approach should be correct. The attached (untested and uninstalled) patch does the equivalent of the latter, which is simpler. I don't know whether the more-complicated one would perform better. This patch also fixes a glitch in that one should cast pointers to uintptr_t or to intptr_t, not to ptrdiff_t. The difference can matter on unusual platforms like CheriBSD where uintptr_t is wider than ptrdiff_t.