title: Vim won't accept newline as enter
body: <p>I have a default installation of vim on linux, on a system with a vt52 terminal emulator and unicode capability.</p>
  
  <p>Everything has been working fine until today when I moved my vt52 terminfo file from the temporary local user directory to the permanent system directory ... at first it seemed fine, but all the sudden, when I try to execute a colon command by pressing enter (either <code>CTRL-J</code>, or the key itself == decimal 10),  vim just flashes the screen but doesn't execute the command or leave command entry mode.
  However, If I press <code>CTRL-M</code> to get a carriage return character (decimal 13), vim does accept the command.</p>
  
  <p>I tried copying the file back to <code>~/.terminfo</code> again, but it didn't fix the problem...</p>
  
  <p>I thought this might be either a tty issue or a corrupted vimrc file, so...
  first I tried deleting the <code>.viminfo</code> and <code>.vimrc</code> files, and doing a <code>stty sane</code> before starting vim but neither helps.  I just noticed that enter doesn't work in insert mode either, but CTRL-M does.</p>
  
  <p>Then I checked from the bash shell, using <code>CTRL-V</code>, that when I press CTRL-M, it shows <code>^M</code> and when I press <code>CTRL-J</code>, it just enters and shows nothing.  So -- to double check -- I did a <code>stty raw</code> and <code>cat - | hexdumpx</code>, and sure enough pressing enter returns only <code>0x0a</code>, and pressing <code>CTRL-M</code> returns only <code>0x0d</code> ; so the keyboard driver is returning the proper character in raw mode, and I retested in sane mode which apparently maps both of them to <code>0x0A</code>.</p>
  
  <p>The termcap file I re-compiled with tic, and copied to both <code>~/.terminfo/v/vt52u</code> where it worked fine before -- and over to <code>/usr/share/terminfo/v/vt52u</code>.  </p>
  
  <p>But I don't see anything in the termcap file which could possibly cause the problem.</p>
  
  <pre><code>vt52u|vt52 with UTF-8:\
      :am:eo:rs=\Ee\Eb0\Eco:is=\EE\Ee:\
      :nl=^j:sr=\EI:bl=^g:ta=^i:\
      :ho=\EH:cr=^m:le=\ED:nd=\EC:do=\EB:up=\EA:ta=^i:nw=^j^m:xn:\
      :cm=\EY%+ %+ :it#8:co#75:li#24:\
      :sc=\Ej:rc=\Ek:\
      :vi=\Ef:ve=\Ee:\
      :so=\Eb0\Ec3:se=\Eb0\Eco:mh=\Eb8\Eco:mr=\Ebo\Ec0:me=\Eb0\Eco:\
      :cl=\EH\EJ:cb=\Eo:cd=\EJ:ce=\EK:\
      :km:kb=^h:
  </code></pre>
  
  <p>EDIT:
  I've isolated the problem by experiment 5 listed below, as being caused by something either in or missing from the above termcap file, or in the tic compiler's conversion of it to terminfo.</p>
  
  <p>So -- <em>what termcap entry is missing or which existing one is causing the problem?</em></p>
  
  <p>----------------------  Additional experiments as I try to figure it out -------------------</p>
  
  <p>1:  doing a <code>:set term</code> in vim reveals <code>term=vt52u</code> .... which is correct.  So VIM should be using the above termcap file, but I don't know from where (eg: cached version, or not -- or corrupted.)  and :version only reveals +termcap which says vim should be using a tic compiled termcap file which is what I've been trying to give it.</p>
  
  <p>2: I recompiled ncurses-5.9, and re-installed it to make absolutely sure no corrupt files exist.  Nothing changed even with: <code>./configure --prefix=/usr --without-cxx --without-cxx-binding --without-ada --without-manpages --without-progs --without-tests --with-build-cc=gcc --with-shared --without-debug --without-profile --without-gpm --without-dlsym --without-sysmouse --enable-sigwinch --enable-hashmap --enable-scroll-hints --build=i686-linux --host=arm-linux-gnueabi --without-pthread --enable-widec --with-fallbacks=vt52u --disable-big-core --enable-termcap --enable-getcap-cache</code></p>
  
  <p>3: doing a <code>:set termcap</code> shows more keys defined than the termcap file has, which is bad... termcap only defined one key ... and that one should be ^H not ^?, so VIM's value doesn't match, but the other termcap values all match, since ^[ is the same as escape \E  in the termcap file.  So, I have proof that vim is definitely loading the proper termcap file because t_so 's value is unique to the vt52u.  So -- it's not a corrupt termcap.... :( weird.</p>
  
  <pre><code>t_kb &lt;BS&gt;    ^?        &lt;DecMouse&gt;  ^[[ 
  t_kd &lt;Down&gt;  ^@        &lt;NetMouse&gt;  ^[}
  
  t_sr=^[I       t_bc=^[D        t_le=^[D        t_cd=^[J        t_ce=^[K        t_cl=^[H^[J
  t_me=^[b0^[co  t_mr=^[b0^[co   t_ve=^[e        t_vi=^[f        t_nd=^[C        t_se=^[b0^[c0
  t_ZH=^[bo^[c0  t_ZR=^[b0^[co   t_so=^b0^[c3    t_cm=^[Y%p1%' '%+%c%p2%' '%+%c
  </code></pre>
  
  <p>4: Recompiled vim 7.4, to remove all built in terminals, and to insure no corrupt files.  Had no effect; did not fix default value of backspace key being wrong.</p>
  
  <pre><code>echo "Please Edit feature.h so that NO_BUILTIN_TERMCAPS is always #defined."
  sleep 5
  vim /src/feature.h
  
  ./configure --prefix=/usr/ --build=i686-linux --host=arm-linux-gnueabi --with-features=big --disable-darwin --disable-selinux --disable-xsmp --disable-xsmp-interact --disable-mzschemeinterp --disable-tclinterp --disable-netbeans --disable-sniff --disable-gui --disable-cscope --disable-workshop --enable-multibyte --disable-gtktest --disable-gpm --disable-sysmouse --disable-xim --enable-pythoninterp=dynamic --without-x --with-tlib=ncursesw vim_cv_toupper_broken="yes" vim_cv_terminfo="yes"  vim_cv_tty_group="world" vim_cv_tty_mode="0620" vim_cv_getcwd_broken="yes" vim_cv_stat_ignores_slash="yes" vim_cv_memmove_handles_overlap="yes"
  
  echo "Please Edit src/Makefile such that STRIP=arm-linux-gnueabi-strip"
  sleep 5
  vim src/Makefile
  make
  make install
  </code></pre>
  
  <p>5:  In bash, I changed the terminal type to generic "export TERM=VT52" rather than the unicode version, with color support which I compiled with tic.  <strong>** THE NEWLINE PROBLEM WENT AWAY WITH THE SACRIFICE OF COLOR COMMANDS, AND OTHER FEATURES OF VT52U **</strong>  I need the features, but apparently something about the termcap file I listed above is defective. </p>