spaces inserted or not when pasting

Hi,
Im having difficulty understanding how writer handles soaces when copying/pasting. Sometimes i can select a word by mouse click, when no spaces are in the selection, but on pasting a space - leading ivthink but maybe its trailing- is also inserted. Yet if the same word is selected in the same way and deleted,a space is not deleted with it -which would be useful ss it would avoid introduction of double spaces in the document. Other times i make a selection which includes a leading or trailing space, but this space is stripped on pasting.
Im still using an oldish version: 5.2.2.2 on ubuntu ;
But it would be good if someone could either confirm that this was an issue that has been fixed in a later version; or explain why, and under what circumstances, spaces are included / added to / removed from a selection on the clipboard, as its mystifying and often irritating to me.
Thanks,
Gary