Steps to reproduce:
1. Create new empty writer document;
2. Press Ctrl+F2, switch to Functions tab, select Input Field, enter "test" (w/o quotes) in Reference, press Insert;
3. Enter any text in Input Field query window, press OK (or Ctrl+Enter);
4. Close in Fields window (not required, for the convenience);
5. Set cursor in front of the input field (press Home), press Enter for the new line.
Current behavior:
input field duplicated to the new line
Expected behavior:
newline inserted before the input field
Operating System: Windows XP
Last worked in: 4.1.3.2 release

Created attachment 96237[details]
possible fix
So attached patch does fix the issue, but it very lowlevel. Cutting out something with zero length should be a noop in general, but it still does stuff -- even though I cant imagine it does something sensible.
Now it might very well be that something using the cut implementation depends (or works around) on any funky behavior cutting nothing has and would cause trouble if this patch is applied.
Running subsequentcheck/slowcheck/unitcheck on this right now to see if there are any obvious issues with this.