I'm reading Nori's paper The fundamental group scheme, and I have some problems in certain passages of the proofs. This one is from chapter 1, 2.3.
Let $X$ be a complete connected reduced $k$-scheme. We have that $\operatorname{H}^0(X, \operatorname{end}V)$ is of finite dimension for all finite vector bundles $V$, and Nori states that this implies that Krull-Schmidt-Remak holds: for all finite vector bundles there is a unique decomposition (up to reorder blah blah blah...) in a direct sum of indecomposable subbundles ($V$ is indecomposable if $V=V_1\oplus V_2\Rightarrow V=V_1\vee V=V_2$). Why?
If $H^0(X, End V)$ is f.d., then it is a f.d. $k$-algebra, and so we find a maximal decomposition of the identity as a sum of orthogonal idempotents, say $1 = \sum_i e_i.$ (Here maximal means that we can't refine this further.) This gives the corresonding decomposition of $V$. (The summand $V_i$ of $V$ is the image of the idempotent $e_i$.)