Switch buffer if file is already opened instead of always call edit. This fix the problem where the cursor would always return at the beginning of the file.