text: Title: Completion in indented lines incorrectly strips the prefix when jedi is disabled
  Body: Completion in indented lines incorrectly strips the prefix when jedi is disabled.
  
  Originally reported in Notebook (https://github.com/jupyter/notebook/issues/7397) then JupyterLab (https://github.com/jupyterlab/jupyterlab/issues/16522), but narrowed down to IPython 8.8 / 8.11; https://github.com/ipython/ipython/pull/13943 fixed a related issue but did not cover this one.
  
  