In Eclipse, unfortunately you can have two areas highlighted at the same time, so you may get unexpected results when cutting (ctrl-x). To reproduce; open a LS library and click on a function or sub; note that it is highlighted. Then select some code in that function/sub; note that the focus is now inside the function/sub. Now click back on the function/sub. Note that both seem to have focus; but cutting will cut the function/sub in its entirety.
This seems to happen to me all the time, but not necessarily after following the steps above, as there are other ways of demonstrating this bad behavior.