Index: _whatsnew.html
===================================================================
--- _whatsnew.html	(revision 1891)
+++ _whatsnew.html	(working copy)
@@ -42,7 +42,9 @@
 	<p>
 		Fixed Bugs:</p>
 	<ul>
-		<li></li>
+		<li>[<a target="_blank" href="http://dev.fckeditor.net/ticket/1519">#1519</a>] Fixed the issue where
+			the list command might convert one non-selected line if the lines to be converted are
+			selected by keyboard.</li>
 	</ul>
 	<h3>
 		Version 2.6 (SVN)</h3>
Index: editor/_source/classes/fckdomrange.js
===================================================================
--- editor/_source/classes/fckdomrange.js	(revision 1891)
+++ editor/_source/classes/fckdomrange.js	(working copy)
@@ -919,5 +919,75 @@
 			return container ;
 
 		return container.childNodes[ range.endOffset - 1 ] || container ;
+	},
+
+	/*
+	 * This is a pretty funny function. This is needed because of the way
+	 * block selections are handled in MS Word. For example, if you try to
+	 * convert the following into a list (^ delimits selection):
+	 * <p>^Line 1<br>Line 2<br>^Line 3</p>
+	 * Then it should become:
+	 * <ul><li>Line 1</li><li>Line 2</li></ul><p>Line 3</p>
+	 *
+	 * Or this:
+	 * <p>^Line 1</p><p>Line 2</p><p>^Line 3</p>
+	 * Should become:
+	 * <ul><li>Line 1</li></li>Line 2</li></ul><p>Line 3</p>
+	 *
+	 * However, we need to be careful when there are multiple <br>s:
+	 * <p>^Line 1<br>Line 2<br><br><br>^<br>Line 3</p>
+	 * Should become:
+	 * <ul><li>Line 1</li><li>Line 2</li><li></li><li></li></ul>
+	 * <p><br>Line 3</p>
+	 *
+	 * Other cases to be careful:
+	 * <p>^Line 1<br>Lin<b>e 2<br><i><u>^Lin</u></i></b>e 3</p>
+	 * <p>^Line 1<br>Line 2<br>^<img>Line 3</p>
+	 * <p>Line 1^<br>Line 2<br>Line 3^</p>
+	 */
+	Trim : function()
+	{
+		if ( this.CheckIsCollapsed() )
+			return ;
+
+		var endContainer = this._Range.endContainer ;
+		var endOffset = this._Range.endOffset ;
+		var startNode = this.StartNode ;
+
+		if ( endContainer.nodeType == 3 )
+		{
+			if ( endOffset > 0 )
+				return ;
+
+			var currentNode = endContainer ;
+			var commonParent = FCKDomTools.GetCommonParents( endContainer, startNode ).pop() ;
+			while ( FCKDomTools.CheckIsEditable( currentNode.parentNode )
+				       && currentNode == currentNode.parentNode.childNodes[0]
+				       && currentNode.parentNode != commonParent )
+				currentNode = currentNode.parentNode ;
+
+			if ( currentNode.previousSibling && currentNode.previousSibling.nodeName.IEquals( 'br' ) )
+				this.SetEnd( currentNode.previousSibling, 3 ) ;
+
+			if ( FCKListsLib.BlockElements[ currentNode.nodeName.toLowerCase() ] )
+				this.SetEnd( currentNode, 3 ) ;
+		}
+		else if ( endContainer.nodeType == 1 )
+		{
+			var currentNode = endContainer[ endOffset ] || endContainer[ endOffset - 1 ] ;
+			var commonParent = FCKDomTools.GetCommonParents( currentNode, startNode ).pop() ;
+			while ( FCKDomTools.CheckIsEditable( currentNode.parentNode )
+				       && currentNode == currentNode.parentNode.childNodes[0]
+				       && currentNode.parentNode != commonParent )
+				currentNode = currentNode.parentNode ;
+
+			var prevNode = ( endOffset >= endContainer.length ? currentNode : currentNode.previousSibling ) ;
+			
+			if ( prevNode && prevNode.nodeName.IEquals( 'br' ) )
+				this.SetEnd( prevNode, 3 ) ;
+
+			if ( FCKListsLib.BlockElements[ currentNode ] )
+				this.SetEnd( currentNode, 3 ) ;
+		}
 	}
 } ;
Index: editor/_source/commandclasses/fcklistcommands.js
===================================================================
--- editor/_source/commandclasses/fcklistcommands.js	(revision 1891)
+++ editor/_source/commandclasses/fcklistcommands.js	(working copy)
@@ -58,6 +58,7 @@
 		var doc = FCK.EditorDocument ;
 		var range = new FCKDomRange( FCK.EditorWindow ) ;
 		range.MoveToSelection() ;
+		range.Trim() ;
 		var state = this.GetState() ;
 
 		// Midas lists rule #1 says we can create a list even in an empty document.
@@ -142,6 +143,8 @@
 				nextRangeExists = false ;
 			else
 			{
+				// Firefox allows a selection to contain multiple range objects.
+				// Handle them as well.
 				if ( rangeQueue == null )
 				{
 					rangeQueue = [] ;
