'Frame selected' object do not fit window space

Hi,

is there a option to change the ‘Frame selected’ operator behaviour.
The default behaviour is with a space between the object and the window border and no option to avoid this.
The ‘Camera fit frame to selected’ is what i need , the object fits exactly in the camera border without space in between.
Maybe there is a script that zoom the view to the selected object so that the object fits into the view preciscly.