The following question came up during a Magma calculation:
Suppose that $\mathfrak g$ is a finite-dimensional Lie algebra over $\mathbf C$ and $\mathfrak k \subset \mathfrak g$ a subalgebra of codimension one. Suppose that $\mathfrak k$ is isomorphic to $\mathfrak{sl}_n(\mathbf C)$. Does it follow that $\mathfrak g$ is isomorphic to $\mathfrak {gl}_n(\mathbf C)$?